谁能指导我如何从android浏览器启动我的android应用程序?


当前回答

还应该有<category android:name="android.intent.category. browsable "/>添加到intent过滤器中,以便从链接中正确识别活动。

其他回答

截至2019年6月15日

我所做的是包括所有四种打开url的可能性。

也就是说,有HTTP / HTTPS, 2有WWW前缀,2没有WWW

通过使用这个,我的应用程序现在自动启动,而不需要我选择浏览器和其他选项。

<intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />

    <data android:scheme="https" android:host="example.in" />
    <data android:scheme="https" android:host="www.example.in" />
    <data android:scheme="http" android:host="example.in" />
    <data android:scheme="http" android:host="www.example.in" />

</intent-filter>

下面的链接给出了直接从浏览器启动应用程序(如果已安装)的信息。否则它会直接在游戏商店中打开应用程序,以便用户可以无缝下载。

https://developer.chrome.com/multidevice/android/intents

请在这里看到我的评论:在Android浏览器中创建一个链接启动我的应用程序?

我们强烈反对人们使用他们自己的方案,除非他们正在定义一个新的全球互联网方案。

还应该有<category android:name="android.intent.category. browsable "/>添加到intent过滤器中,以便从链接中正确识别活动。

是的,Chrome搜索而不是寻找方案。如果你想通过URI方案启动你的应用程序,使用Play商店上的这个很酷的实用程序。它拯救了我的一天:) https://play.google.com/store/apps/details?id=com.naosim.urlschemesender