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 looks like : myApp://?host=myhost.com
Manifest :
<intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="myApp" /> </intent-filter> In the activity which is my main activity, i have :
Intent intent = getIntent(); Uri uri = intent.getData(); if (uri != null) { String host = uri.getQueryParameter("host"); } The app does not launch when i have email that has the url as a hyperlink. Also, what would be a good way to test this ?