Android deep link redirected url
- My application is configured to handle a deep link "xyz"
- Then there is a link "abc" which redirects to "xyz" from http 302
- If "abc" is opened with chrome then chrome redirects it to "xyz" and then opens my app
- But if "abc" opens in Gmail, Gmail redirects it to "xyz" but doesn't open my app.
- I know in Gmail that if the user navigates to options -> open with chrome -> that will result in behavior (3)
- But is there any solution that can let Gmail open my app after a URL redirect?
+3
source to share
1 answer
try this in your manifest and use full url (ex: http://www.example.com/dl/appname?page=1&item=1 ) instead of short links gmail doesn't support shortcut url as it has its own web viewing.
<intent-filter
android:autoVerify="true"
tools:node="merge">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:host="ur_host" // www.example.com/
android:pathPrefix="any_prefix" // /dl/appname
android:scheme="https or http"/> //http
</intent-filter>
<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="urScheme"/> //example
</intent-filter>
0
source to share