0

I'm looking for a all in one QR code solution in which the QR code, when scanned, brings you to a specific app detail page in the app store. A few variables:

  • when scanned with an iPhone --> go to Apple app store and app detail/installation page
  • when scanned with an Android --> go to Google play store and app detail/installation page
  • when scanned with Android and no Google play store --> detect the appropriate app store and open the detail/installation page in that one (for example the Beidu app store)
  • when no supported app store is detected open a browser (download link) to give the option to install the APK manually

The above should result in a one QR code solution that helps locating the right app in the appropriate stores and that supports iPhone and Android users. It should also support Android users without the Google play store (for example some Chinese users). If no store with the app is detected the QR should redirect you to the APK which can be downloaded and installed manually

Now I've seen solutions in which you have platform specific result (i.e. iPhone opens an app page in Apple store whilst an Android scan opens the Google play store). But I couldn't find any solution where you could have multiple Android app store support or have a backup link when some special conditions are met.

Any help or push in the right direction is very much appreciated!

  • Have you looked at User Agent detection? Or the hundreds of companies which provide such QR codes? – Terence Eden Sep 10 '14 at 12:51
  • Have you looked at User Agent detection? – Chieliemielie Sep 29 '14 at 11:02
  • Have you looked at User Agent detection? I'm not sure if that is going to provide me the solution I'm looking for, if so I can't see how since I'm quite new to QR code things.. After questioning around I found out that the difficulty is not to detect which platform, the difficulty is in the opening the correct app store (if the app is available) since there are many options. – Chieliemielie Sep 29 '14 at 11:10

2 Answers2

0

This will not be possible directly, since QR codes only contains Text data. So you have to use 3rd party service or own service to redirect into playstores.

Option 1 : Use 3rd party provider

providers :

  1. http://onelink.to/ ( Paid )

  2. https://scanova.io/design-qr-code-generator.html#/create/appstore ( Paid )

  3. https://www.qrdesign.net/en/generate/app-store

  4. http://m.appqr.mobi/ ( Free)

  5. http://www.autofwd.com/ ( Free)

Disadvantages

You might not be able to redirect into other playstores Not Reliable

Option 2 : Create a service on your Own

Generate QR code to link to your web service. From your service you need to identify the device/region ( anything you want) and forward the request accordingly.

Following code copied from this stackoverflow question this is a example.so you can change this however you want.

<?php

**//Handy Code Provided by STEPHENCARR.NET**

$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
$Android= stripos($_SERVER['HTTP_USER_AGENT'],"Android");

//check if user is using ipod, iphone or ipad...
if( $iPod || $iPhone || $iPad ){
        //we send these people to Apple Store
        header('Location: http://www.example.com/'); // <-apple store link here
}else if($Android){
        //we send these people to Android Store
        header('Location: http://www.example.com/'); // <-android store link here
}
**//Handy Code Provided by STEPHENCARR.NET**

?> 
0

I had the same problem in my server using Express.js (Node.js). To detect whether the operating system is Android, iOS, or any other you can use a third-party library, like Platform.js. In my case I didn't want to bloat my code with yet another library, so I used a simpler solution that seems to work fine:

router.get('/redirecttostores', (req, res) => {

  const isIos =
    !!req.headers['user-agent'].match(/iPhone/) ||
    !!req.headers['user-agent'].match(/iPad/) ||
    !!req.headers['user-agent'].match(/iPod/);

  const isAndroid = !!req.headers['user-agent'].match(/Android/);

  if (isIos) {
    return res.redirect(
      'https://apps.apple.com/us/app/yourappname/id0123456789'
    );
  } else if (isAndroid) {
    return res.redirect(
      'https://play.google.com/store/apps/details?id=com.yourwebsite.yourappname'
    );
  } else {
    return res.redirect('/'); // Neither iOS nor Android!
  }

});

You would just need to create a QR Code with this route: yourwebsite.com/redirecttostores.

RdC1965
  • 412
  • 5
  • 8