调用系统已安装的浏览器

来源:互联网 发布:望各位悉知 编辑:程序博客网 时间:2024/06/06 09:30

1.直接调用系统浏览器

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("你要打开的网址"));startActivity(intent);

2.选择系统已安装的浏览器打开

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("你要打开的网址"));startActivity(Intent.createChooser(intent, "请选择"));

在此记录下,以免下次遇到,又要百度、、、、、

原创粉丝点击