68

Is there any solution for Android devices similar to the iOS 6 smart app banner?

Here is the code for smart app banner

<meta name="apple-itunes-app" content="app-id=311507490, affiliate-data=partnerId=30&siteID=k1CkFsOh4nQ"/>
Guvante
  • 18,775
  • 1
  • 33
  • 64
  • 1
    What are you trying to do? You are unclear on what or how you want to ban apps, when and where. FYI "blocker" apps don't really work. – Kristopher Micinski Oct 31 '12 at 23:07
  • @KristopherMicinski: thanks for your reply...i used this and achieved for ios6 http://www.macgasm.net/2012/09/19/ios-6-smart-app-banners/ is there a way to implement for android devices –  Nov 01 '12 at 00:13
  • Duplicate of this -- http://stackoverflow.com/questions/13074694/smart-app-banners-windows-store-app-html-meta-tag-equivalent-for-android-google/13075180#13075180 (answer: no, not really) – 323go Nov 01 '12 at 00:57
  • Similar: http://stackoverflow.com/questions/19357191/does-meta-name-google-play-app-work/23580770#23580770 – trante Apr 16 '15 at 19:31
  • You should check out the Branch cross platform app banner. It also does click/download tracking and is free to use: https://github.com/BranchMetrics/Smart-App-Banner-Deep-Linking-Web-SDK – Alex Austin Aug 10 '15 at 01:16

4 Answers4

81

Since Chrome 44 Beta you can push your app in Chrome for Android with a native app install banner on your website.

Please see the answer below.


Old answer

I needed that myself, so I created a jquery plugin to mimic a smart banner for Android and older iOS versions.

https://github.com/jasny/jquery.smartbanner

Arnold Daniels
  • 16,516
  • 4
  • 53
  • 82
  • Does your plugin support the app-argument=myURL property, like in iOS smart banners, that allows you to pass a URL to the app ? – Peter Willsey Mar 26 '13 at 18:17
  • Not yet. I was already planning to implement that next week, so hold tight. – Arnold Daniels Mar 28 '13 at 07:44
  • 5
    do you implemented checking app installed or not for android ? i m using your js but in case of android everytime it shows "view" not "open" even if app is installed in phone. – mrYogi Apr 08 '14 at 06:38
  • I can't seem to get the banner to display (whether viewing site on desktop or on actual android device.) Even the demo page that comes with the plugin doesn't appear to display anything. Is the code current? – EmmyS Jul 18 '14 at 21:25
  • @EmmyS Make sure that you're using version 1.0.0 https://github.com/jasny/jquery.smartbanner/releases/tag/v1.0.0 – Arnold Daniels Jul 20 '14 at 14:33
  • @Jasny-ArnoldDaniels - I am. Does it require jquery 1.8 as shown in the sample? We're using an older version and can't update for various reasons. But again, even using the sample code provided, and keeping the hosted 1.8 version, it still isn't showing anything other than the `...` text in the body before the script stuff starts. – EmmyS Jul 21 '14 at 14:34
  • @EmmyS Ask a new question on stackoverflow for this and make sure to include a jsfiddle demonstrating the problem. – Arnold Daniels Jul 21 '14 at 14:47
  • Please may i know how to get url from smart app banner in android?i am wasting time around 2 days and i have done as deep link concept in android default behavior.its working fine but when i try to smart app banner,i confused.please guide me – rkv Feb 26 '15 at 04:50
  • @patrioit Ask a new question on stackoverflow for this and make sure to include a jsfiddle demonstrating the problem. – Arnold Daniels Feb 27 '15 at 07:27
  • @Arnold Daniels i have asked as new question regarding smart app banner in android.please just respond me.http://stackoverflow.com/questions/28735762/getting-url-from-smart-app-banner-in-android – rkv Mar 02 '15 at 10:48
  • @Jasny-ArnoldDaniels: Your plugin doesn't seem to work position-fixed menus, or have I missed something? Thanks. – 2540625 Apr 01 '15 at 02:30
  • Jasny - sorry to rez this thread but can you complete my pull request containing cleanups of the jquery smartbanner repo – Stephen Tetreault Dec 22 '15 at 18:30
  • Actually scratch that, @Jasny-ArnoldDaniels there are about 27 pull requests held in limbo. Help make the repo better plz, don't let it die! – Stephen Tetreault Dec 22 '15 at 19:23
  • @SMT It has become hack on hack. If I accept one PR, 2 others are no longer mergable. I really need some collaborators on this project so we can create a v2. – Arnold Daniels Dec 23 '15 at 00:13
  • @Arnold Daniels 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:43
  • The link in this answer is no longer valid. I think it's now https://github.com/jasny/jquery.smartbanner – aikind Aug 03 '23 at 17:09
30

Since Chrome 44 Beta you can push your app in Chrome for Android with a native app install banner on your website. There are a couple of criteria that need to be met in order to enable it:

  • You will need a web app manifest file
  • You will have to serve your web using https
  • The user has visited your site twice over two separate days during the course of two weeks.

Read more about it in the official docs from Google.

AdamK
  • 21,199
  • 5
  • 42
  • 58
emccracken
  • 839
  • 12
  • 21
  • 1
    This is not true. It only enables your website to act like native app by letting the user to pin/add shortcut/bookmark on the homescreen for quick access. It doesn't really take you to the app store for you download the native app. The approach that you're describing is when one wants to make a website act like native. That's completely different than what OP is asking. – shriek Dec 14 '15 at 20:13
  • 2
    Please read the "Native app install banner" part of the posted link. This is exactly what the OP is asking about. – emccracken Dec 14 '15 at 20:15
  • 3
    No. Please read the article. Since Chrome 44 you can add Native app install banners pointing to Google Play. I would suggest you reading my answer AND the official Google post I have linked to. Search for "Native app install banner " on that page. You can read right? – emccracken Dec 14 '15 at 20:23
  • 1
    "A new powerful feature for native app developers also landed in Chrome 44 Beta. Native App install banners are similar to Web app install banners, but instead of adding to the Home Screen will let the user inline install your native app." – emccracken Dec 14 '15 at 20:24
  • but, does this 'Native App Install' banner pass the context/data from my web page (where i clicked this banner) to my App that will be launched post installation from store ? – yathirigan Oct 23 '19 at 11:53
  • 1
    It seems the links are broken and send users to a different site now. I think I found it in the internet archive though: https://web.archive.org/web/20160428180729/https://developers.google.com/web/updates/2015/03/increasing-engagement-with-app-install-banners-in-chrome-for-android?hl=en – dkniffin Jun 03 '20 at 13:44
  • @dkniffin - seems to work now, at least for me - redirects to web.dev – emccracken Jun 10 '20 at 19:14
2

You add the Google Sign-In button to your page with a special parameter and then users can sign in and specify which device to install your app to directly from your website.

This is the most "officially supported" implementation I know of:

https://developers.google.com/identity/sign-in/web/android-app-installs

From the link:

By adding the Google Sign-In button to your web site, you can automatically prompt your users to download your Android app over the air to their Android devices. To enable this feature, you must use the same Google Developers Console project for your Web and Android clients, and configure your web app's sign-in button.

Your web app must use the Google Sign-In button to prompt your web site users to download your app the first time that they sign in. This feature is enabled by adding the apppackagename parameter to your sign-in button.

Kirk Elliott
  • 133
  • 8
1

There are two APIs available:

Sebas LG
  • 1,715
  • 1
  • 18
  • 31