I want to open my app from an email URL, basically like the example shown below for Twitter.com.
Email with link:
Selection to open app or browser:
After you click on the app choice, the Twitter app opens:
I tried the following code, but it is not working:
<intent-filter> <action android:name="android.intent.action.VIEW"></action> <category android:name="android.intent.category.DEFAULT"></category> <category android:name="android.intent.category.BROWSABLE"></category> <data android:host="www.twitter.com" android:scheme="http"></data> </intent-filter>
If anyone has a proper answer, please write some examples here.
The following code worked for me:
<intent-filter> <action android:name="android.intent.action.VIEW"></action> <category android:name="android.intent.category.DEFAULT"></category> <category android:name="android.intent.category.BROWSABLE"></category> <data android:host="www.my.app.com" android:path="launch" android:scheme="http"></data> </intent-filter>
With the email link set as http://www.my.app.com/launch
.
Ref: Launching Android Application from link or email
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With