Reputation: 43
I'm trying to make one app link to open our app instead the browser.
The app links Assistant tells me that the pattern works fine but when I try it on the emulator or physical device it doesn't work :(
Filter:
<activity android:name=".activities.AppLinksActivity">
<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:scheme="http"
android:host="www.emagister.com"
android:pathPattern="/.*-cursos-.*.htm"
/>
</intent-filter>
</activity>
Url to match: http://www.emagister.com/curso-avanzado-lenguaje-programacion-javascript-cursos-2863146.htm
Assistant message:
But when I open it on the device or click run test i doesn't work and opens the browser.
If I put android:pathPattern="/juridico-master-compliance-officer-controller-juridico-empresarial-cursos-3299291.htm" in the manifest instead the above pathpattern everything works perfect.
What I'm doing wrong?
Thanks in advance!!
Upvotes: 2
Views: 1461
Reputation: 13633
Your pathPattern
regex seems unnecessarily complex; I don't believe it's documented which regex parser is used here, but I wouldn't be surprised if it's somehow choking on this.
Try simplifying as much as possible and then add elements back (but as few as possible). I suspect pathPattern='.*cursos.*'
would still get you the same thing.
Upvotes: 1