Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to add to 'Add to homescreen' popup for android mobile [duplicate]

Does anyone know any example, how I can show popup message for 'Add to homescreen' in chrome. In my web app I wanna show popup message first time user open web app to save short cut icon. Using html5 and jquery. (so that my webapp will run as native app next time).

like image 621
user1121267 Avatar asked Aug 08 '14 08:08

user1121267


1 Answers

Since Chrome 42 there is now a standard way of accomplishing this that prompts the user to add your application to the home screen as long as your web application fulfills the following requirements:

  • You have a web app manifest file
    • The manifest defines how your app appears on the user’s system and how it should be launched - and you are required to have a short_name and a 144x144 png icon
    • Your icon declarations should include a mime type of image/png
  • You have a service worker registered on your site. We recommend a simple custom offline page service worker
  • Your site is served over HTTPS (you need a service worker after all)
  • The user has visited your site twice over two separate days during the course of two weeks.
like image 171
stian Avatar answered Nov 14 '22 01:11

stian