Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redirect users to iTunes app store or google play store?

I'm looking for an easy solution to post one link of my app e.g. on Facebook and it should automatically redirect to the right app store if the user accesses it with a mobile device. Otherwise the users should be redirected to my website.

iOS app: http://itunes.apple.com/de/app/dawawas/id588285122

Android app: https://play.google.com/store/apps/details?id=de.conceptspace.dawawas.greenturtle&hl=en

Website: https://www.dawawas.com/

like image 653
Florian Avatar asked Feb 16 '16 10:02

Florian


People also ask

Is Apple App store better than Google Play?

We can conclude that the Apple App Store provides its users with higher-quality apps. While Google Play also includes great apps, there is a high possibility that you can come across some buggy applications that might cause security concerns.

Can Apple users use Play Store?

Because Android apps don't run on iOS, there's no way to run the full Google Play Store on an iPhone or iPad.

How do I switch Google Play to Apple?

On your Android device, open the Move to iOS app. If you don't have the Move to iOS app, you can tap the QR code button on your new iOS device and scan the QR code using the camera on your Android device to open the Google Play Store. Tap Continue, and read the terms and conditions that appear. To continue, tap Agree.


2 Answers

If you want to roll your own and not use a third party, there's also a Javascript solution:

<!DOCTYPE html> <html lang="en"> <head>     <meta charset="utf-8" /> <script> function getMobileOperatingSystem() {   var userAgent = navigator.userAgent || navigator.vendor || window.opera;        // Windows Phone must come first because its UA also contains "Android"     if (/windows phone/i.test(userAgent)) {         return "Windows Phone";     }      if (/android/i.test(userAgent)) {         return "Android";     }      // iOS detection from: http://stackoverflow.com/a/9039885/177710     if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {         return "iOS";     }      return "unknown"; }</script>  <script> function DetectAndServe(){     let os = getMobileOperatingSystem();     if (os == "Android") {         window.location.href = "http://www.Androidexample.com";      } else if (os == "iOS") {         window.location.href = "http://www.IOSexample.com";     } else if (os == "Windows Phone") {         window.location.href = "http://www.WindowsPhoneexample.com";     } else {         window.location.href = "http://www.NowherLandexample.com";     } } </script> </head> <body onload="DetectAndServe()"> </body> </html> 
like image 62
brianfit Avatar answered Sep 19 '22 09:09

brianfit


U mean something like this?

Onelink

How to use onelink.to

onelink.to is the easy and fuss-free way to link to your app!

Just add the URLs to your app and we will determine which to use every time someone is using your onelink.to address.

You can use onelink.to free of charge, both for private and commercial use. We have no plans to change that.

And you can also add a fallback url to your website.

Hope this helps u out.

like image 26
Strider Avatar answered Sep 21 '22 09:09

Strider