I have a deeplink defined for my Android app in the manifest file:
<activity android:name="com.example.DeeplinkActivity"
android:screenOrientation="portrait"
android:theme="@style/MyBaseTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<!-- Accepts URIs that begin with "example://shelf” -->
<!-- Currently handles Ads deeplink structure (iPhone structure) -->
<data
android:host="shelf"
android:pathPrefix=""
android:scheme="example" />
<!-- Accepts URIs that begin with "example://com” -->
<data
android:host="com"
android:pathPrefix=""
android:scheme="example" />
<!-- Accepts URIs that begin with http://www.example.com/some/sample/page.htm” -->
<data
android:host="www.example.com"
android:pathPrefix="/some/sample/page.htm"
android:scheme="http" />
</intent-filter>
</activity>
I have also some links in my app that look similar but should NOT be treated as deeplinks. They do begin with http://www.example.com but they have a completly different prefix. For example: http://www.example.com/other/not/deep/link.htm .
For some reason the intent filter defined for DeeplinkActivity is being trigerred even though it is defined with the prefix "/some/sample/page.htm".
Does the prefix being ignored? if not why one should use the the pathPrefix attribute when defining the deeplink intent filter?