从网页启动android应用程序
我有两份申请,AppOne和AppTwo AppOne是一个简单的应用程序,它可以导出一个活动,以便通过以下意图过滤器从网页启动该活动从网页启动android应用程序,android,android-intent,Android,Android Intent,我有两份申请,AppOne和AppTwo AppOne是一个简单的应用程序,它可以导出一个活动,以便通过以下意图过滤器从网页启动该活动 <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:n
<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:host="what should be the host for a local page?"
android:scheme="what should be the scheme?" />
</intent-filter>
具体来说,我想知道
谢谢这个方案可以是你想要的任何东西-所以选择一个对你的应用程序有意义的词,比如“apptwo” 如果您的方案是唯一的,则不需要在意图过滤器的数据部分指定主机。如果您只是将链接用作触发器(即始终加载相同的页面index.htm),那么URL的其余部分是什么并不重要 在AppTwo中,当意图触发时,您只需安排将相关文件加载到webview中 <a href="apptwo://trigger">launch app</a> 启动应用程序</a>
谢谢你的回复。我在某个地方读到,使用你自己的方案不是一个好主意。 <a href="apptwo://trigger">launch app</a>