darja
darja

Reputation: 5025

pathPattern with parameters in intent-filter

I want my application to proceed some web links. I've added intent-filter for this in manifest. It looks like this:

<activity android:name=".SomeActivity">
    <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:scheme="http" android:host="*.something.com" />
        <data android:pathPattern="/.*/download/.*" />
    </intent-filter>
</activity>

It works. But then I was asked to process only those urls, where precise parameter is specified. So, I've changed pathPattern like this:

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

Then I try to open in browser url like http://something.com/en/download/what?param=1234 But pattern doesn't work, my application is not offered to open.

I have doubts about parameter. May be pathPattern doesn't look at them at all? Or what else I am doing wrong?

Upvotes: 1

Views: 2902

Answers (1)

AndyW
AndyW

Reputation: 1471

I know it's late but this might save someone's time.

no parameters or query strings. (thus, the part after the ? mark is simply not matched against anything)

Upvotes: 9

Related Questions