Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open an installed app from an email URL in Android? [duplicate]

Tags:

I want to open my app from an email URL, basically like the example shown below for Twitter.com.

Email with link:

Email with link

Selection to open app or browser:

Select app or browser

After you click on the app choice, the Twitter app opens:

Open Twitter app

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.

like image 291
Roadies Avatar asked Sep 26 '14 05:09

Roadies


1 Answers

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

like image 194
hemu Avatar answered Sep 18 '22 21:09

hemu