简体   繁体   中英

google web app add to home screen

I have a java script web application and i am using the latest chrome for mobile beta version for my web app.
I am adding the app shortcut to my home screen as specified at google developer page, but the launcher icon I see on my mobile home screen (galaxy i9300, android 4.1) is the icon I want but inside a white page.
Here is my code in my html:

<head>
  <link rel="shortcut icon" sizes="196X196" href="/Files/Images/196icon.png">
</head>

I have tried different icon sizes but still no luck.
what am i missing?

Thanks to all,
Shimi

I've used a different value for the "rel" value. Android usually supports the "apple-touch-icon" tag

 <link href="/Files/Images/196icon.png" rel="apple-touch-icon" />

Here's a good link for reference

It is best to follow the guidance here: https://developers.google.com/chrome/mobile/docs/installtohomescreen

Note we only actually show the full icon when you set your app to use the <meta name="mobile-web-app-capable" content="yes"> tag in your page.

Using these tags will help you. They worked for me :-)

 <link rel=apple-touch-icon  href="../192x192.png">`
 <meta name=msapplication-TileImage content="../144x144.png">
 <meta property=og:image content="../192x192.png">
 <link rel="icon" type="image/png" href="../192x192.png" sizes="192x192"> 
 <link rel="manifest" href="../manifest.json">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM