1

I have an app and a mobile site. I also send emails to my users. I would like the following to happen if my users open these emails on their mobile phones and click on a link:

If a user has installed my app, then launch the app and open the relevant page inside it.

If a user has NOT installed my app, then launch the browser and take him to the relevant page on my mobile site.

I want this to happen seamlessly and automatically. I DON'T want to use the inbuilt android prompt as users end up choosing chrome (since it is the first option shown). How can I do this? Would ideally want solutions for both android & ios.

  • possible duplicate of [How to redirect the user to a mobile app or a website on click of a hyperlink sent in an email? Should it need to be handled on server-side using PHP?](http://stackoverflow.com/questions/28892526/how-to-redirect-the-user-to-a-mobile-app-or-a-website-on-click-of-a-hyperlink-se) – 2Dee Jun 03 '15 at 13:11
  • Not a duplicate. The question above talks about iOS primarily, while my question is about both iOS and Android. Also my user base is 85% Android, so I don't really care about iOS much. – sushil krishnan Jun 04 '15 at 13:27

3 Answers3

0

You can do this with a landing page. Send user to landing page, check platform, then check if they have app installed(if they have registered custom url scheme) if they have then they go to app. Otherwise they go to mobilesite.

See this answer by https://stackoverflow.com/a/29019660/1165581 by Adam

Community
  • 1
  • 1
Lasse
  • 1,153
  • 1
  • 10
  • 21
  • Please don't post answers for duplicate questions, simply vote to close the question as dupe. – 2Dee Jun 03 '15 at 13:11
  • Not a dupe, guys. Please don't close this. All your references are to do with iOS and not Android. I primarily want a seamless solution for Android. iOS is just a bonus. – sushil krishnan Jun 04 '15 at 13:31
0

You can NOT prevent the Android prompt which lets the user choose an option. What you can do is, create a link to your mobile site and have your App react to urls containing your domain. So what will happen is:

  • if a user clicks the link and does NOT have your App installed, he/she will be prompted with the default url handler prompt (only the first time) and then open the mobile site in the prefered browser
  • if a user clicks the link and DOES have your App installed, he/she will get the same prompt, only your App will be listed there as well next to browser Apps.

Here is an explanation on how to this: Android Respond To URL in Intent

Community
  • 1
  • 1
Saenic
  • 1,593
  • 13
  • 14
-1

You can use URL Schemes in iOS for your requirement to be full filled. By Using URL Scheme you can do exactly same. Clicking on link will launch your app. Please go through the concept of URL Schemes.

Follow the below referral link:

http://code.tutsplus.com/tutorials/ios-sdk-working-with-url-schemes--mobile-6629

Hope this helps!!

Sivajee Battina
  • 4,124
  • 2
  • 22
  • 45