rezandro
rezandro

Reputation: 79

pathpattern in intent-filter doesn't match '#!'

How can i filter this URl in the intent-filter to open app on clicking on it: https://www.host.com/something#!something

it seem '#' is reserved as a wildcard in UriMatcher that pathpattern work with due to @ianhanniballake in this post: Intent filter pathPrefix with '#' not working

i couldn't either filter it with '!' like this:

<data
      android:host="www.host.com"
      android:pathPattern=".*!.*"
      android:scheme="https" />

any idea?

Upvotes: 0

Views: 487

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007322

# is not part of the path of a URL. It is the separator between the path and the fragment (a.k.a., the fragment identifier). As a result, you cannot filter on it in pathPattern. There is no way to filter on a fragment in a <data> element. You would need to filter on the rest.

Upvotes: 1

Related Questions