简体   繁体   English

谷歌网络应用程序添加到主屏幕

[英]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. 我有一个Java脚本Web应用程序,并且我的Web应用程序使用的是最新的Chrome移动版Beta。
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. 我正在将应用程序快捷方式添加到Google开发人员页面上指定的主屏幕上,但是我在移动主屏幕(银河i9300,android 4.1)上看到的启动器图标是我想要的但在白页内的图标。
Here is my code in my html: 这是我的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. 我为“ rel”值使用了另一个值。 Android usually supports the "apple-touch-icon" tag Android通常支持“ apple-touch-icon”标签

 <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 最好遵循以下指导: 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. 请注意,当您将应用程序设置为在页面中使用<meta name="mobile-web-app-capable" content="yes">标记时,我们实际上只会显示完整图标。

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">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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