L
L
Leonid2016-09-06 14:05:53
Browsers
Leonid, 2016-09-06 14:05:53

A single QR code for installing an application from Android or the AppStore - how?

On some sites you can see the following:
b1cd63666c.png
If you scan a QR code on an Android device, then we get to Google Play, if on Apple, then resp. in AppStore. It turns out one QR code for installation from Google Play and AppStore. How is this done?
If I understand correctly. The QR code leads to the URL where the script runs, which determines from which device the request came from and redirects either to Google Play or the AppStore?
Where to see such a mechanism?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey, 2016-09-06
@easycode

For example - onelink.to

S
SkuAn, 2020-09-25
@SkuAn

I am not an expert in these matters, but if you do not have your own website, then it is better to use the services for such a service.
But if you have your own website, it's easy to make a new page (for example , https://my_site/my_application ) and paste the code there:

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Redirect</title>
<script type="text/javascript"> // <![CDATA[
//iPhone Version:
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
    window.location = "https://ВАША_ССЫЛКА_НА СТРАНИЦУ_В_APP_STORE";
}
//Android Version:
if(navigator.userAgent.match(/android/i)) {
    window.location = "https://ВАША_ССЫЛКА_НА СТРАНИЦУ_В_GOOGLE_PLAY";
}
</script>
</body>
</html>

The redirect works based on data from USER AGENT.
And then you make a QR code (on any qr generator site convenient for you) with a link to this new page of yours https://my_site/my_application .
Depending on where the user came from, he will be redirected either there or there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question