web链接跳转安卓app的问题
来源:互联网 发布:数据库应用领域 编辑:程序博客网 时间:2024/05/16 07:32
Load a web URL
Google Now
- "open example.com"
To open a web page, use the ACTION_VIEW
action and specify the web URL in the intent data.
- Action
ACTION_VIEW
- Data URI Scheme
http:<URL>
https:<URL>
- MIME Type
PLAIN_TEXT_TYPE
("text/plain"
)"text/html"
"application/xhtml+xml"
"application/vnd.wap.xhtml+xml"
Example intent:
public void openWebPage(String url) { Uri webpage = Uri.parse(url); Intent intent = new Intent(Intent.ACTION_VIEW, webpage); if (intent.resolveActivity(getPackageManager()) != null) { startActivity(intent); }}
Example intent filter:
<activity ...> <intent-filter> <action android:name="android.intent.action.VIEW" /> <!-- Include the host attribute if you want your app to respond only to URLs with your app's domain. --> <data android:scheme="http" android:host="www.example.com" /> <category android:name="android.intent.category.DEFAULT" /> <!-- The BROWSABLE category is required to get links from web pages. --> <category android:name="android.intent.category.BROWSABLE" /> </intent-filter></activity>
Tip: If your Android app provides functionality similar to your web site, include an intent filter for URLs that point to your web site. Then, if users have your app installed, links from emails or other web pages pointing to your web site open your Android app instead of your web page.
0 0
- web链接跳转安卓app的问题
- 安卓通过app之间的跳转
- JS和安卓互相调用以及Scheme协议完成外部链接跳转app指定页面
- JS和安卓互相调用以及Scheme协议完成外部链接跳转app指定页面
- JS和安卓互相调用以及Scheme协议完成外部链接跳转app指定页面
- 安卓的fragment跳转问题
- 安卓APP开发的一些问题
- 安卓app跳转微信应用
- 关于android app跳转和从web跳转的问题(转载修正)
- 安卓web app开发
- 11.安卓跳转到一个网页链接、本地链接
- 浏览器点击链接启动安卓APP
- 基于JavaScript的安卓Web App测试环境搭建
- 关于安卓开发页面跳转的小问题
- 安卓欢迎界面和activity之间的跳转问题
- 使用Android的webview将web app打包成安卓的app和解决安卓webview不支持input type=file问题
- C#:异步时的链接跳转问题
- 关于frameset集中链接的跳转问题
- windows 下配置 rsync
- [硬件结构]为什么branch prediction和cache在硬件体系结构中这么重要?
- JDK1.5或以上版本泛型报错
- JavaWeb - JavaScript中Window对象
- Andorid 清除项目中不用的资源
- web链接跳转安卓app的问题
- 数据量大MSYQL并发
- R树空间索引
- ARRAYLIST VECTOR LINKEDLIST 区别与用法(2014-10-14)
- DataInputStream和DataOutputStream类
- 将整数转换成数组的相关题目
- Session中StateServer的用法
- 使用github for windows 来将代码托管到github中
- Objective-首个OC的类