Reputation: 5
I have a blogger website using a template, www.aplitechstore.com.br, We have added many app links to download on Google Play, but they do not open in the Google Play Store app but on the website. I want to change that, I want our app and website (in Webview mode) after clicking the link, open it in the Google Play Store app.
Upvotes: 0
Views: 7121
Reputation:
As explained here, Google Play provides url protocol
market://details?id=<package_name>
Applying on Blogger :
Place the following javascript code at the bottom and before </body>
. This will change Google Play links only on Android.
<script>
if (/(android)/i.test(navigator.userAgent)) {
document.querySelectorAll('a[href]').forEach(function (link) {
link.href = link.href.replace('https://play.google.com/store/apps/','market://');
});
}
</script>
Upvotes: 1