Gmail中的深层链接无法启动我的应用

时间:2018-11-03 18:54:58

标签: android gmail deep-linking

我想从gmail中提供的链接启动我的应用。我已将我的应用程序中的一项活动声明为能够通过将其意图过滤器注册为:-

来处理链接
<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="http"/>
</intent-filter>

我的链接是“ http://192.168.43.37:3000/users/verify?token=eyJhbGciOiJIUzI1NiJ9.bmlsYW5qYW5kYXdAZ21haWwuY29t.mr13h1m0”。

当我使用adb将意图发送为:- adb shell是start -a android.intent.action.VIEW -d“ http://192.168.43.37:3000/users/verify?token=eyJhbGciOiJIUzI1NiJ9.bmlsYW5qYW5kYXdAZ21haWwuY29t.mr13h1m0PgHZBZ362iycdnzlzYoIYpD6O5apsLmt7Vg” 然后它为选择器提供了我的手机和我的应用程序上所有已安装的浏览器,并且效果很好。

但是,当单击gmail中的链接时,它在选择器对话框中仅将浏览器作为选项。

这可能是什么原因,我该如何解决?谢谢。

0 个答案:

没有答案