如何触发深层链接?

问题描述

在我的应用中,我启用了以下深层链接

<activity android:name="com.example.android.DeepLinkActivity">
    <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:host="www.bartsimposon.net" android:scheme="https"/>
        <data android:pathPattern="/kwitchiboo/.*\\.html"/>
    </intent-filter>
</activity>

我期望当我进入智能手机浏览器时

https://www.bartsimpson.net \ kwitchiboo \ something.html

触发我的DeepLinkActivity吗?

解决方法

您必须单击此链接,而不是在某些浏览器中的地址字段/多功能框中手动输入。导航到您手机上的此站点/主题,然后尝试单击此处:

https://www.bartsimpson.net/kwitchiboo/something.html

在安装应用程序并首先单击此类链接后,系统会询问您要在哪个应用程序中打开URL,浏览器或您的应用程序。还有“总是”和“仅一次”选项

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...