Search code examples
androidapplinks

Android App Links - Pattern with # in URL


I am trying to implement Android App Links. The website where the url is linked to, is developped with Angular, thus all URLs have a # in it (#! exactly).

http://myDomain/#!/vehicle/schema_id

I cannot find the good pattern that works with the #

<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="https"
            android:host="www.mydomain.com"
            android:pathPattern="/#!/vehicle/.*" />
</intent-filter>

this pathPattern works perfectly with an url without the # such as

http://myDomain/!/vehicle/schema_id for instance

So my issue is specific to the dash :-S

If have tried :

  • /\#!/vehicle/.*
  • /\\#!/vehicle/.*
  • /.+/vehicle/.*
  • /../vehicle/.*
  • /*/vehicle/.*
  • /%23!/vehicle/.*

and other that I don't recall

Thanks in advance for your possible answers


Solution

  • You simply cannot use # symbol in URL for deep links because Android thinks that every symbol after # is Fragment identifier

    In other words system detects URL only as http://myDomain/ it doesnt see part after #.