一、打开链接 

 

        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); 

更多相关文章

  1. Android(安卓)Chromium WebView html js 开发系列
  2. [RK3399][Android7.1.1] WifiAp:开机默认打开wifi热点
  3. Android(安卓)SDK Manager无法更新的解决
  4. Android打开/关闭数据流量
  5. 一个简单的iPhone项目及代码
  6. 链接器解析多重定义的全局变量
  7. android webkit
  8. webview开发-适配多分辨率的Android设备
  9. unity内置浏览器插件UniWebView的使用(支持Android,ios,Mac)

随机推荐

  1. Android(安卓)am命令
  2. android ViewPager 竖向滑动
  3. js 中判断手机是iphone,ipad还是Android、
  4. [android]Context 上下文
  5. android TextView ellipsize 只显示一个
  6. 2013.12.23 ——— android assents文件
  7. Android(安卓)NDK JNI 入门笔记-day01-创
  8. Android获取手机屏幕的宽高
  9. 2011.08.15(2)——— android audioManager
  10. Android(安卓)近百个项目的源代码