I remember that when I went on certain websites with Chrome Android, there was a bottom popup which displayed something like:
"Want to install a shortcut on your home desktop? Click here."
How to enable this "progressive-web-app" behaviour for Android browsers and iOS browsers, offering to install a desktop shortcut icon?
Here is what I already tried, without success: in the HTML itself:
<link rel="manifest" href="manifest.json" />
<link href="32.png" rel="icon shortcut" sizes="3232" />
<link href="192.png" rel="apple-touch-icon" />
The manifest.json
contains:
{
"short_name": "myapp",
"name": "myapp",
"icons": [
{
"src": "48.png",
"type": "image/png",
"sizes": "48x48"
},
{
"src": "72.png",
"type": "image/png",
"sizes": "72x72"
},
/// etc. same for 96, 144, 192, 512
],
"start_url": "https://example.com",
"background_color": "#000000",
"display": "standalone",
"theme_color": "#000000",
"description": "Test"
}
Note: it's not easy to debug "Add to home screen" on a given website, because the prompt doesn't always show if you already visited the website before, see my comment on the accepted answer of How to bring back "Add to home" banner for progressive web app after removed the icon from home screen?