android启动默认浏览器
来源:互联网 发布:php验证类型 编辑:程序博客网 时间:2024/04/26 21:59
一、启动android默认浏览器
在Android程序中我们可以通过发送隐式Intent来启动系统默认的浏览器。如果手机本身安装了多个浏览器而又没有设置默认浏览器的话,系统将让用户选择使用哪个浏览器来打开连接。关于Intent的更多内容请参考《常用Intent》
示例1
Intent intent =newIntent();
intent.setAction("android.intent.action.VIEW");
Uri content_url =Uri.parse("http://www.163.com");
intent.setData(content_url);
startActivity(intent);
这样子,android就可以调用起手机默认的浏览器访问。
二、启动指定浏览器
在Android程序中我们可以通过发送显式Intent来启动指定的浏览器。
启动Android原生浏览器
示例2
Intent intent =newIntent();
intent.setAction("android.intent.action.VIEW");
Uri content_url =Uri.parse("http://www.163.com");
intent.setData(content_url);
intent.setClassName("com.android.browser","com.android.browser.BrowserActivity");
startActivity(intent);
只要修改以intent.setClassName("com.android.browser","com.android.browser.BrowserActivity");
中相应的应用程序packagename 和要启动的activity即可启动其他浏览器来
uc浏览器":"com.uc.browser", "com.uc.browser.ActivityUpdate“
opera浏览器:"com.opera.mini.android", "com.opera.mini.android.Browser"
qq浏览器:"com.tencent.mtt", "com.tencent.mtt.MainActivity"
阅读全文
0 0
- 启动android默认浏览器
- 启动android默认浏览器
- 启动android默认浏览器
- 启动android默认浏览器
- 启动android默认浏览器
- 启动android默认浏览器
- android启动默认浏览器
- Android开发之启动android默认浏览器
- 打开URL启动android默认浏览器,启动指定浏览器
- 打开URL启动android默认浏览器,启动指定浏览器
- 使用URL启动android默认浏览器,启动指定浏览器
- 打开URL启动android默认浏览器,启动指定浏览器
- 【web browser】启动android默认浏览器
- android 下载默认启动QQ浏览器
- java 启动默认浏览器
- C++ 启动默认浏览器
- android实现程序启动直接调用系统默认浏览器
- Myeclipse修改默认启动浏览器
- P2P网络ISIS的PSNP报文的两种用途
- Cmake 自学笔记(linux)(六)
- 这三十年
- 4890. 【NOIP2016提高A组集训第14场11.12】随机游走 (2017.10B组)
- 【强化学习】AlphaGo Zero详解
- android启动默认浏览器
- 【java.lang.UnsupportedClassVersionError】版本不一致出错
- VMware虚拟机安装ghost win7系统方法
- 如何一键将json数据快速导入eolinker
- 小白开发报表工具(解析SQL语句)
- openssl数字证书常见格式与协议介绍
- Python每日小结(六)
- Android5.0双卡维护
- Window和ubantu在局域网内文件传输