Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
355 views
in Technique[技术] by (71.8m points)

android - Does 'meta name="google-play-app"' work?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...