Android 浏览器中启动自定义应用
来源:互联网 发布:随身携带淘宝去异界 编辑:程序博客网 时间:2024/06/05 05:24
By Felix
Use an <intent-filter>
with a <data>
element. For example, to handle all links to twitter.com, you'd put this inside your <activity>
in your AndroidManifest.xml
:
<intent-filter> <data android:scheme="http" android:host="twitter.com"/> <action android:name="android.intent.action.VIEW" /></intent-filter>
Then, when the user clicks on a link to twitter in the browser, they will be asked what application to use in order to complete the action: the browser or your application.
Of course, if you want to provide tight integration between your website and your app, you can define your own scheme:
<intent-filter> <data android:scheme="my.special.scheme" /> <action android:name="android.intent.action.VIEW" /></intent-filter>
Then, in your web app you can put links like:
<a href="my.special.scheme://other/parameters/here">
And when the user clicks it, your app will be launched automatically (because it will probably be the only one that can handle my.special.scheme://
type of uris). The only downside to this is that if the user doesn't have the app installed, they'll get a nasty error. And I'm not sure there's any way to check.
- Android 浏览器中启动自定义应用
- iOS 浏览器或应用中启动应用
- Android 应用启动界面自定义
- Android 应用启动界面自定义
- Android程序中如何启动浏览器
- Android程序中如何启动浏览器
- android中通过浏览器启动nativeAPP
- Android程序中如何启动浏览器
- Android程序中如何启动浏览器
- Android程序中如何启动浏览器
- android ios 在浏览器中自定义URL
- android ios 在浏览器中自定义URL
- 自定义协议从浏览器中启动本地应用程序
- 自定义协议从浏览器中启动本地应用程序
- Android 在应用中启动其他应用
- android 中 浏览器调用本地app应用
- Android中通过浏览器直接打开应用
- android采用Chrome Intent方式实现从浏览器启动应用
- 从Android浏览器(并不是Appliaction里面的webkit)打开应用程序/应用商店
- oracle自动备份方法
- OpenCV结构
- 如果你使用BitBle复制位图,结果显示出来是黑色的...
- 用SchemaSpy制作数据库结构文档
- Android 浏览器中启动自定义应用
- java中传值及引伸深度克隆的思考
- 存储管理、lvm和文件系统
- CATiledLayer的levelsOfDetail和levelsOfDetailBias的含义(转)
- poj 1191 棋盘分割
- 现实世界的Windows Azure:采访Cenzic的市场总监Mandeep Khera
- 怎样在网页里加百度地图标注
- 数据库表(9i&10g学习)
- OpenGl学习笔记1——建立一个可以支持OpenGL的窗口