Intent filter pathPrefix with '#' not working

I am trying to set an intent filter to trigger my activity when the user clicks on the following URI: example.com/pathA/pathB/#pathC/someGUID

so I added the following XML to the manifest file:

<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" android:pathPrefix="/pathA/pathB/#pathC" android:scheme="http" /> </intent-filter> 

I think the โ€œ#" char is already useless, but I tried to avoid this char without any luck. Any ideas?

UPDATE: when I said "try escaping", I meant using percent encoding (# equals% 23)

+7
source share
1 answer

Custom filters use UriMatcher to parse URIs and determine if there is a match. # is the URI pattern for the number, as shown in the examples in UriMatcher . There is no escape sequence in the UriMatcher source code to exit # from the URI. Therefore, you must use a different, non-reserved character (note that * also reserved as a wildcard for any text).

+12
source

All Articles