我知道如果要在网页中的链接内打开安卓应用,我们需要在 AndroidManifest.xml
中编写以下内容:
<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="my_scheme" android:host="my_host" />
</intent-filter>
问题在于我以以下方式编写了它: <intent-filter>
<action android:name="my_action"/>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="my_scheme" android:host="my_host" />
</intent-filter>
我没有添加 android.intent.action.VIEW
,而是添加了自己创建的操作。由于版本已经发布,我无法更改。
问题是,
是否有一种方法可以从 JavaScript 或简单的 HTML 页面运行应用程序,通过在页面中定义特定的操作?
谢谢,
Paz.
已解决:
感谢 David,我找到了一个解决方案:
<a href="intent://my_host#Intent;scheme=my_scheme;action=my_action;end">Link to my stuff</a>