0

I cannot think of the name of how you do it on iOS devices but when a user lands on my site I would like to send something to the device telling it that we have an app and to alert the user and if they with to be directed to the app store they can.

Is there this facility on Android ?

Oliver Bayes-Shelton
  • 6,135
  • 11
  • 52
  • 88

3 Answers3

1

I believe this question was posted before. Maybe one of the answers from here will help.

Community
  • 1
  • 1
gunar
  • 14,660
  • 7
  • 56
  • 87
1

There's nothing specific for Android that does it. All you would need to do is to check the user agent for the visitor of your site that it contains Android, you can do this via PHP. Then if it is android, display a javascript alert dialog to ask the user whether they want to install the app, and if the user clicks OK, they are redirected to the play store.

I think the link would be something like market://.

Hope this helps

Boardy
  • 35,417
  • 104
  • 256
  • 447
1

Assuming you have php on the server side, you can use Mobile Detect Library:

<?php
include 'Mobile_Detect.php';
$detect = new Mobile_Detect();
if($detect->isAndroidOS()){
    header('Location: https://play.google.com/store/apps/details?id=com.popcap.pvz_row/');
    exit;
}
else {
    // The normal flow
}
?>

The redirect to play store address will trigger a prompt to user whether he wants to proceed with browser or play store App. On an android device.

Calvin
  • 3,302
  • 2
  • 32
  • 41