android中调用浏览器的代码
16lz
2021-01-24
- android中调用浏览器的代码
- http://www.2cto.com/kf/201111/109800.html
- 2011-11-02 08:52:00 我来说两句
- 收藏 我要投稿
-
默认的浏览器都列出让用户选择的
Java代码
Uri u = Uri.parse(url);
Intent it = new Intent(Intent.ACTION_VIEW, url); TestActivity.this.startActivity(it);
Uri u = Uri.parse(url);
Intent it = new Intent(Intent.ACTION_VIEW, url); TestActivity.this.startActivity(it);
指定浏览器的
Java代码
Uri u = Uri.parse(url);
it.setData(u);
it.setAction( Intent.ACTION_VIEW);
it.setClassName("com.android.browser","com.android.browser.BrowserActivity");
TestActivity.this.startActivity(it);
摘自hellorheaven
更多相关文章
- 超酷的 gankIO 客户端
- 关于启动Activity动画样式以及问题。
- Android(安卓)Studio创建Include c++项目,并在c++代码引用本地so
- Android之类似于黑名单的短信拦截
- This Handler class should be static or leaks might occur And
- Android下载文件提示文件不存在。。。 java.io.FileNotFoundExce
- android webview pre[name=code] syntaxHighlighter 代码高亮
- Android播播放完SD卡指定文件夹音乐之后,自动播放下一首
- [Android] 调用系统裁切图片的 !!! FAILED BINDER TRANSACTION !