Is it possible to use wildcards on the android:host attribute ?
Something like:
android:host="*.site.com"
android:pathPattern=".*"
android:pathPrefix="/m/"
android:scheme="http" />
Or even
android:host="*.site.*"
android:pathPattern=".*"
android:pathPrefix="/m/"
android:scheme="http" />
Yes. After reading the Android code of IntentFilter.AuthorityEntry.match(), I can see that there is a way to put wildcard on host, but only to match the beginning of host. The rules are these:
This will work:
android:host="*site.com"
android:pathPattern=".*"
android:scheme="http" />
It will catch links of:
On the other hand the one below won't work:
android:host="*.site.*"
android:pathPattern=".*"
android:scheme="http" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With