How to make QR code for BOTH Android Market and App Store

73,687

Solution 1

QR codes can contain any text. The convention for their use as a link to the Web is to contain one URL. Most QR reader apps will then load the webpage referenced by the URL embedded in the QR code.

There is no way to embed information in a QR code that directly links to two different URLs when read by any QR code reader. A custom QR code reader could parse a QR code with two URLs and decide which URL to follow, but you'll have to figure out a way to get your custom QR reader to your customers.

The functionality you're looking for can reside at the URL in the QR code. The embedded URL could link to a webpage that checks user agents and redirects appropriately. If the Safari on iOS user agent is detected, redirect to Apple's App Store. An Android user agent would be redirected to an appropriate app store. I would set all other user agents to go to a product page with links to both stores.

If I was doing this, I would investigate sending all users to a product page. The opportunity to engage in further marketing of the product, sharing more information with the potential customer may result in better sales. I'd set up some A-B testing to see which is better.

Solution 2

A QR code is just a link / URL, soo point to a URL on your site and use PHP to determines if the user is using Android or iPhone. Then do a PHP header location to the iPhone app URL if it is iPhone, or Android app if it is Android.

Here is the PHP code:

<?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 */

?> 

Solution 3

Yet another option is to use http://onelink.to which is an easy to use service for the same purpose.

Solution 4

Another option would be to use OmniQRCode.com. It's a service that lets you use a single QR Code. When a smartphone scans the QR Code the service detects and redirects the smartphone to the relevant app market. It also groks variations like Android 1.6 vs Android 2.2.

Solution 5

Maybe its a bit late, but I found those guys http://www.visualead.com/ And I loved it!

Share:
73,687
JaakL
Author by

JaakL

Geospatial tech, mobile apps, data science. Founder of Nutiteq, acquired by CARTO, Sixfold.com

Updated on July 09, 2022

Comments

  • JaakL
    JaakL almost 2 years

    I have an app which has versions for both Android and iPhone. So I have two URL-s for them (Market and AppStore), but I do not want to add two different QR codes to the homepage. Is there a way (online service I'd expect) to have single URL for both markets, which will detect user device and will forward immediately to suitable application version? Programmatically looks really trivial, but perhaps someone has already solved the issue.

    UPDATE: It seems I had to create the service myself. Feel free to try and use it also: http://qrappdownload.appspot.com/ . You can give two URL-s and it generates QR core for URL which is universal for the two biggest platforms. The universal URL is resolved by same service, based on mobile user agent (just whether it consists Apple or Android string is checked). Downside is that QR code has to be quite large, as the URL has to include both appstore URLs and is therefore pretty long. Maybe you can shorten the URL with some URL shortening service, have not tried it.

  • JaakL
    JaakL almost 13 years
    I know there can't be direct link, but it is possible with URL resolver (proxy) like given in updated question. Thank you!
  • Ralph B
    Ralph B about 12 years
    THANKS! I was looking for a service like this--was almost ready to write my own solution...it's perfect (if a little unpolished looking)
  • VoT
    VoT over 10 years
    Not working for me.. it says "too many redirections"
  • MichaelChirico
    MichaelChirico over 8 years
    just happened upon this myself, used it to share a popular application in a group chat (recipients on multiple mobile OS), seems to have worked as intended.
  • Ryan J. McDonough
    Ryan J. McDonough over 7 years
    I'm surprised that this isn't the accepted answer. This solution also makes it way easier to support additional platforms without having to change the QR code.
  • Tina
    Tina over 5 years
    Its works very well. But is it possible that someone else might update the code that I generated and mine stops working. Is it possible?
  • tbussmann
    tbussmann almost 3 years
    as of 2021-07 this Project seems out of service