Android浏览器如何打开网页 文章分类:移动开发
一、打开链接

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获取打开各种文件Intent汇总
  2. Android(安卓)SDK Manager解决更新时的问题 :Failed to fetch URL
  3. Android(安卓)判断是否连接网络
  4. 指定浏览器访问指定页面(支持UC、Opera、QQ、Dolphin、Skyfire、
  5. Android(安卓)EditText 代码实现键盘弹出打开和关闭工具类
  6. Using Ant to Automate Building Android(安卓)Applications
  7. android 获取应用列表 点击打开应用
  8. TextView显示链接
  9. JS判断Android、iOS或浏览器的多种方法(四种方法)

随机推荐

  1. Netfliter状态跟踪之动态协议的实现浅析(t
  2. PolarDB和Aurora区别
  3. POLARDB问题
  4. ‘大案牍术’遇上阿里云数据库POLARDB,火
  5. 网络子系统在链路层的收发过程剖析
  6. MongoDB-Elasticsearch 实时数据导入
  7. PHP提交表单失败后如何保留已经填写的信
  8. 超全局变量与命名空间
  9. 六种实现负载均衡技术的方式
  10. 高效简单的云服务器登录配置