Open Android app from URL using intent-filter not working

I thought I will post this here since I spent some time looking into why my intent filter did not work. It turns out that it was working all along but matches are exact. Thus if you register your intent for http://myexample.com and you click in http://myexample.com/blah it will not work.

Adding the following fixed the issue:

<data android:pathPattern="/.*" />

So the intent filter looks like:

<intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:host="example.com" />
            <data android:scheme="https" />
            <data android:pathPattern="/.*" />
</intent-filter>

Leave a Comment