打開連接
打開連接html
- Intent it = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.baidu.com"));
- it.setClassName("com.android.browser", "com.android.browser.BrowserActivity");
- getContext().startActivity(it);
打開本地網頁java
- Intent intent=new Intent();
- intent.setAction("android.intent.action.VIEW");
- Uri CONTENT_URI_BROWSERS = Uri.parse("content://com.android.htmlfileprovider/sdcard/123.html");
- intent.setData(CONTENT_URI_BROWSERS);
- intent.setClassName("com.android.browser", "com.android.browser.BrowserActivity");
- startActivity(intent);
歡迎關注本站公眾號,獲取更多信息