Android浏览器如何打开网页
16lz
2022-07-23
一、打开链接
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);
二、打开本地网页
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);
更多相关文章
- Android(安卓)Chromium WebView html js 开发系列
- [RK3399][Android7.1.1] WifiAp:开机默认打开wifi热点
- Android(安卓)SDK Manager无法更新的解决
- Android打开/关闭数据流量
- 一个简单的iPhone项目及代码
- 链接器解析多重定义的全局变量
- android webkit
- webview开发-适配多分辨率的Android设备
- unity内置浏览器插件UniWebView的使用(支持Android,ios,Mac)