2

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?

Bernhard Barker
  • 54,589
  • 14
  • 104
  • 138
kamal_tech_view
  • 4,235
  • 4
  • 28
  • 49

1 Answers1

10

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.

Community
  • 1
  • 1
Peter Knego
  • 79,991
  • 11
  • 123
  • 154
  • sorry can you give me the suitable example from your end. – kamal_tech_view Nov 02 '11 at 05:32
  • 1
    @Peter: By doing it this way, it still shows the option of Browser right? Is there a way in which in only opens my app directly without giving the option of browsers? – Shobhit Puri Mar 28 '14 at 17:17
  • 1
    Has anyone successfully used a custom URI Scheme link from SMS instead of http(s)? I cannot get the custom links to show as clickable. http(s) work fine. – Priyeshj Jan 27 '17 at 20:47