Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

opening application from the sms/email link

Tags:

android

Let us suppose if I send any message (recommendation) from my mobile to a friends phone who clicks on the link to install application(which is run on my friend's device).

I couldn't get the right ideas to do that.

Can anybody help me?

like image 320
kamal_tech_view Avatar asked Dec 30 '25 13:12

kamal_tech_view


1 Answers

You can create a custom scheme (i.e. a special type of 'link'). If you send such a link via SMS and user clicks on it, then a registered app will be started.

Edited to provide example:

<intent-filter>
    <action android:name="android.intent.action.VIEW"/> 
    <category android:name="android.intent.category.DEFAULT"/>
    <data android:scheme="http" android:host="com.yourhostname"/>
</intent-filter>

Where you change com.yourhostname for your site hostname. So of you send some url in SMS that contains this hostname, e.g. 'http://www.yourhostname.com/some-generated-path', then if user has you app installed this link will be opened by the app, but if not then link will be opened in browser still giving you opportunity to show the content to this user.

like image 126
Peter Knego Avatar answered Jan 02 '26 05:01

Peter Knego