30

When you have a (mobile) site, and corresponding mobile apps for your site, there are meta-tags for iOS and Windows 8 to open a standard notification on the platform to tell your visitor about the app, and lead him to it in the appstore. Now, I've found some vage reference on the nets to the android version:

<meta name="google-play-app" content="app-id

But I can't find any trusted reference to it. So I'm asking the question here: Does this meta-tag work on Android?

Borniet
  • 3,544
  • 4
  • 24
  • 33
  • I answered a similar question "Creating an Android Smart Banner" with this answer, hopefully it will help you: https://stackoverflow.com/a/32046978/594784 – emccracken Jul 17 '17 at 10:00

3 Answers3

41

Does this meta tag works in Android ? No.
Can it be handled ? Yes.

iOS 6 and later, natively shows a smart banner that reminds browser user, about the mobile application. But android doesn't support this natively.

To have this banner in android browsers you can use a jquery plugin: https://github.com/jasny/jquery.smartbanner

First add this:

<meta name="google-play-app" content="app-id=com.mygood.id">

Then include smart banner:

<link rel="stylesheet" href="jquery.smartbanner.css" type="text/css" media="screen">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="jquery.smartbanner.js"></script>

At last initialize it:

$.smartbanner({
  title: 'My good title',
  author: 'My smart author'
});

Source: http://www.dunnsolutions.com/content/application-development-blog/-/blogs/smart-app-banners-for-ios-and-android
Related: Creating an android smart app banner

Daut
  • 2,537
  • 1
  • 19
  • 32
trante
  • 33,518
  • 47
  • 192
  • 272
  • 1
    smart banner isn't working in android or windows phone 8.1 for me, and FYI I think the authors are letting it go kind of cold. There are about 27 pull requests pending, one of which is mine, and some recent comments that seem to be going unanswered. – Stephen Tetreault Dec 22 '15 at 20:14
  • This answer it out-of-date. Android supports native app install banners now by adding additional fields to your web app manifest. – Kevin Brotcke Oct 05 '19 at 01:21
  • @trante Is there a feature to display rating from Google Play / App Store? I had try your code. But I don't find it – moses toh Apr 28 '20 at 02:45
8

You could look at adding this to your web app manifest instead. At least for Chrome and FireFox.

When adding the properties prefer_related_applications and related_applications along with name and icons you should get prompted.

Example copied from developer.google.com:

"prefer_related_applications": true,
"related_applications": [
  {
    "platform": "play",
    "id": "com.google.samples.apps.iosched"
  }
]
user276648
  • 6,018
  • 6
  • 60
  • 86
gwest7
  • 1,556
  • 19
  • 26
-6

EDIT: apparently this doesn't work, despite Google's documentation.

According to developer.android's guide to Linking to Your Products, if the HTML link to the app is http://play.google.com/store/apps/details?id=package_name, the corresponding Android link would be market://details?id=package_name. This should link users directly to a specific app's product details page on Google Play.

Michael McGinnis
  • 999
  • 9
  • 27