panagulis72
panagulis72

Reputation: 2169

Issue in android:pathPrefix on AndroidManifest.xml with special character #

I have the following link: https://thus.customapp.it/#/app/customapp/itemDetail/45289348293423

I want that this link is captured and opened with my app. So, I added these lines on AndroidManifest 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:scheme="https" android:host="thus.customapp.it" android:pathPrefix="/#/app/customapp/itemDetail"/>
</intent-filter>

I also tried with:

<data android:scheme="https" android:host="thus.customapp.it" android:pathPrefix="/#/app/customapp/itemDetail/.*"/>

and this:

 <data android:scheme="https" android:host="thus.customapp.it" android:pathPattern="/.*/.*/.*/.*/..*"/>

and this:

  <data android:scheme="https" android:host="thus.customapp.it" android:android:pathPrefix="/#"/>

and this:

<data android:scheme="https" android:host="thus.customapp.it" android:pathPattern="/#/.*" />

but it doesn't work.

P.S. with the following code:

<data android:scheme="https" android:host="thus.customapp.it" android:pathPattern="/.*"/>

it works, but I need to intercept just a url which contains "itemDetail", and not, for example, https://thus.customapp.it/#/app/customapp/editItem/45289348293423

Upvotes: 1

Views: 819

Answers (1)

GOVIND DIXIT
GOVIND DIXIT

Reputation: 1828

Use

android:path="/%23/app/customapp/itemDetail/.* 

instead of

android:pathPrefix="/#/app/customapp/itemDetail/.*"

Edit: As suggested by @panagulis72 we should use %23 instead of #

Upvotes: 1

Related Questions