My test uri string is
http://test.host.com/path/test.html?key1=val1&key2=val2
And I make intent-filter in manifest
A. scheme & host (It works but I do not want)
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data
android:scheme="http"
android:host="test.host.com"
/>
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
B. A & path(pathPrefix, pathPattern) (Not worked)
<data
android:scheme="http"
android:host="test.host.com"
1. android:path="path/test.html" -> not worked (link to chrome broswer)
2. android:path="path" -> not worked (link to chrome broswer)
3. android:pathPrefix="path" -> not worked (link to chrome broswer)
4. android:pathPattern="user/invite.*" -> same (I do not know pattern)
/>
I want to start my app when only (path/test.html),
If you need start your app only If for link
/path/test.html
Then Useandroid:path
attribute indata
tag onlyAs
android:path
attribute specifies a complete path that is matched against the complete path in an Intent object. Butandroid:pathPrefix
attribute specifies a partial path that is matched against only the initial part of the path in the Intent object.So when use
android:pathPrefix
attribute notandroid:path
attribute That mean your app may start for/path/test.html
,/path/test.html?key1=value1
,/path/test.html?key1=value1&key2=value2
,etcMore Information about android doc for data tag into
intent-filter
You are missing the slash at the beginning. The following should work:
OR
The
pathPrefix
attribute specifies a partial path that is matched against only the initial part of the path in the Intent object.android:pathPrefix="/path/"
will also work.