I would like to know how I can open my app directly in the google play store.
It happens that we have an application that has a WebView pointing to the site of our company, on the site of our company we are placing the code below (that is a test site), that's where we detect depending on the package if you are using the app, when you detect that you use our app we want to send you an alert message and redirect it to the play store app so you can download a new app from us.
I show my html code to explain myself better.
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="/global_js/jquery/jquery-1.8.2.min.js"> </script>
<title>APP</title>
<?php
if($_SERVER['HTTP_X_REQUESTED_WITH'] == "com.ejemplo.cooperativa"){
echo 'estás desde la app';
//$ch = curl_init("market://details?id=com.ejemplo.cooperativa");
//curl_exec($ch);
echo " <SCRIPT>window.location.href='https://play.google.com/store/apps/details? id=com.ejemplo.cooperativa&feature=search_result#?';</SCRIPT>";
}
else{
echo 'NO estás desde la app';
}
?>
</head>
<body >
</body>
</html>
I hope it has been understood.
I have the following error:
do not show http://imageshack.com/a/img924/1170/H8Kbqo.png
Thank you in advance.