通过packgername 启动browser
2016-04-28 10:49
169 查看
Android 5.1源码中使用
try {
Intent intent1 = new Intent();
intent1.setAction("android.intent.action.VIEW");
Uri content_uri = Uri.parse("http://www.baidu.com");
intent1.setData(content_uri);
intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent1);
} catch (ActivityNotFoundException e) {
Slog.w(TAG, "No activity to handle assist action.", e);
}
try {
Intent intent1 = new Intent();
intent1.setAction("android.intent.action.VIEW");
Uri content_uri = Uri.parse("http://www.baidu.com");
intent1.setData(content_uri);
intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent1);
} catch (ActivityNotFoundException e) {
Slog.w(TAG, "No activity to handle assist action.", e);
}
相关文章推荐
- 使用索引不一定能提高查询性能
- 上机题-字符串反转
- angular.extend(dst, src)对象拓展
- mybatis3.2.0与mybatis3.3.0传参异常
- Java File类功能扩展
- Java后端WebSocket的Tomcat实现
- vs 调试技巧 1
- Wordpress图片显示模糊的问题
- php常见的几个魔术方法
- php第六讲
- 从架构漫谈九篇文章看软件体系结构
- chm文件打开空白无内容的解决办法
- 最短路
- 在ios系统中查看模拟器和真机中的沙盒目录
- Android源码编译之Nexus5真机编译
- HDU 5600 N bulbs
- 安装数据库注意要点
- SQLSever中的触发器基本语法与作用
- 打开MySQL的慢查询记录
- LinkedList与ArrayList的区别