我在我的安卓应用上启用了深度链接功能,目前运行良好。
但是,我希望意图过滤器只监听特定的pathPrefix
,即http(s)://(www.)mydomain.com/e
而不是其他任何pathPrefix
。
这可行吗? 我将我的意图过滤器代码附加在AndroidManifest.xml
中。
<intent-filter android:label="My App Name">
<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"
android:host="www.domain.com"
android:pathPrefix="/e" />
<data android:scheme="http"
android:host="mydomain.com"
android:pathPrefix="/e" />
<data android:scheme="https"
android:host="www.mydomain.com"
android:pathPrefix="/e" />
<data android:scheme="https"
android:host="mydomain.com"
android:pathPrefix="/e" />
</intent-filter>