1

what I am trying to do is, implement a functionality where a user send a message to one of his/her contacts in whatsapp and by clicking that message (it could have a link or something), the receiver of the message should come to my app or if the app is not installed, it should go to the link of my app in Play Store. How can this be done?

kerry
  • 2,362
  • 20
  • 33

1 Answers1

0

My only idea is to add an intent filter, that starts your app if the device opens a special URL (for example www.your-project.com). Have a look on this website: http://developer.android.com/training/basics/intents/filters.html

If the user has your app installed, a click on the link will open your app. Otherwise the link will be opened by your default browser.

Jokus
  • 473
  • 7
  • 20
  • Actually I am a bit new in android. Could you please tell me what would be my special URL if I use intent filter and do I have to write some HTML page also(as some other answers suggest)? – kerry Sep 29 '14 at 09:10
  • You may use any Url, even if you don't own it or if it does not exist. Here is an example: http://stackoverflow.com/questions/13289586/open-android-app-from-url-using-intent-filter-not-working So if anyone clicks on a link of that url and has your app installed it will open the app, otherwise it will open your default browser. So it would be better to own that website, to leave a message to all those who don't have your app yet. – Jokus Sep 29 '14 at 18:02