android打开指定的浏览器
来源:互联网 发布:数据备份软件 编辑:程序博客网 时间:2024/05/21 11:35
一、启动android默认浏览器(http://blog.csdn.net/hudashi/article/details/8176298/)
在Android程序中我们可以通过发送隐式Intent来启动系统默认的浏览器。如果手机本身安装了多个浏览器而又没有设置默认浏览器的话,系统将让用户选择使用哪个浏览器来打开连接。关于Intent的更多内容请参考《常用Intent》
示例1
Intent intent = new Intent(); 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 = new Intent(); 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调用默认浏览器打开指定Url的方法实例
- Android启动指定浏览器打开图片
- android 跳转到浏览器打开指定页面
- android指定浏览器打开特定网页
- 浏览器打开应用指定的界面
- 打开URL启动android默认浏览器,启动指定浏览器
- 打开URL启动android默认浏览器,启动指定浏览器
- 打开URL启动android默认浏览器,启动指定浏览器
- 指定浏览器打开网站
- Android指定调用系统自带浏览器打开链接
- 【Android实测】调起系统浏览器打开指定页面代码
- 默认浏览器打开指定网址
- 默认浏览器打开指定Url
- Selenide指定特定浏览器打开
- linode上搭建有standby+mirror功能的Greenplum集群并用TPC-DS基准测试
- 基于hadoop2.7集群的Spark2.0,Sqoop1.4.6,Mahout0.12.2完全分布式安装
- N*N数组插入数字
- Windows下VS2013 C++编译测试faster-rcnn
- Android Studio 环境搭建 与相关问题解决方案
- android打开指定的浏览器
- 动态代理
- 分层架构下的纯JDBC事务控制简单解决方案
- 如何判断横屏还是竖屏?
- session无法设置
- CryEngineV5.3编译
- Window下通过charles代理抓取iphone手机Https请求乱码问题
- add-node flowchart
- sql将几张表的数据合并到一张表里面一行显示