Reputation: 281
I want to handle some deep links with a slash in the end of the URL in Android, such as:
https://www.xxx.xxx/mobile/
https://www.xxx.xxx/mobile
The one has a slash in the end of the URL and the other one doesn't have.
I want to use
<data
android:host="www.xxx.xxx"
android:pathPattern="/mobile/?"
android:scheme="https" />
to handle it, but it doesn't work. Does anyone have any idea?
Upvotes: 0
Views: 1902
Reputation: 1330
Instead of
android:pathPattern="/mobile/?"
use
android:pathPattern="/mobile.?"
Upvotes: 1
Reputation: 7526
Use multiple pathPattern:
<data android:host="www.xxx.xxx" android:pathPattern="/mobile" android:scheme="https" />
<data android:host="www.xxx.xxx" android:pathPattern="/mobile/" android:scheme="https" />
Upvotes: 1