How To Launch An Android App With Custom Url Scheme
I want to launch my app from a custom URL scheme. I checked the deep links section on dev android and here is a snippet of my code. This doesnt seem to fire though with a URL that
Solution 1:
Try this, edit your IntentFilter
<intent-filter><actionandroid:name="android.intent.action.VIEW"></action><categoryandroid:name="android.intent.category.DEFAULT"></category><categoryandroid:name="android.intent.category.BROWSABLE"></category><dataandroid:host="www.youtube.com"android:scheme="http"></data></intent-filter>
EDIT
<intent-filter><actionandroid:name="android.intent.action.MAIN" /><categoryandroid:name="android.intent.category.LAUNCHER" /></intent-filter><intent-filter><actionandroid:name="android.intent.action.VIEW"></action><categoryandroid:name="android.intent.category.DEFAULT"></category><categoryandroid:name="android.intent.category.BROWSABLE"></category><dataandroid:host="www.youtube.com"android:scheme="http"></data></intent-filter>
Solution 2:
The browser converts the scheme to lowercase, so you need to change the data tag to
<data android:scheme="myapp"/>
Solution 3:
k it looks like ACTION_VIEW is a must to support custom URI schemes. I can add VIEW and MAIN though which gets it to work.
Post a Comment for "How To Launch An Android App With Custom Url Scheme"