intent浏览器
来源:互联网 发布:空难 尼尔森 知乎 编辑:程序博客网 时间:2024/06/05 07:07
当短信中有网址时,点击网址可以选择使用该浏览器打开
清单文件中
<activity android:name="com.example.demo.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <!-- 分拣系统,匹配当前的Activity可以用来打开网页 --> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="http" /> <data android:scheme="https" /> <data android:scheme="about" /> <data android:scheme="javascript" /> </intent-filter> </activity>
MainActivity中:
Intent intent = getIntent();if (intent != null) {if (intent.getData() != null) {String path = intent.getData().toString();//传递过来的urlwebview.loadUrl(path);}}
阅读全文
0 0
- intent浏览器
- Android Intent 调用浏览器
- 安卓隐式intent(打电话,浏览器)
- 安卓隐式intent(打电话,浏览器)
- 使用Intent跳转到浏览器
- Android之Intent之启动浏览器
- 浏览器 自定义sheme sms tel mailto intent:
- intent对于电话和浏览器调用
- intent对于电话和浏览器调用
- intent对于电话和浏览器调用
- intent对于电话和浏览器调用
- Intent 拨号及浏览器打开示例
- Intent调用手机指定浏览器打开网页
- 如何利用intent调用系统的浏览器
- Android通过Intent访问指定的浏览器
- Android--Intent常用(拨号,浏览器,联系人,Wi-Fi)
- android Intent打开URL链接(动态打开浏览器网页)
- intent对浏览器以及电话的具体调用
- Fence Repair(哈夫曼算法+优先队列
- win+linux 搭建Java环境JDK
- python -- scrapy 问题小结
- 【SSH进阶之路】深入源码,详解Struts基本实现流程(七)
- Educational Codeforces Round 5 D
- intent浏览器
- CodeForces 566 D.Restructuring Company(并查集)
- 论建树的方法
- 图背景模糊
- 自定义CString类
- 第四场个人训练赛(未完成)
- Ajax
- 牛客《剑指Offer》 跳台阶
- 文章标题