简体   繁体   English

Android的“添加到主屏幕”基础知识

[英]Android's Add to Homescreen basics

I have read a number of articles about adding a link to the home screen of Android but am failing to get the icon and label I intend. 我已经阅读了许多有关向Android主屏幕添加链接的文章,但未能获得我想要的图标和标签。

It would appear that the more recent articles are focusing on this feature as something to add links which will launch websites as full screen apps, leveraging new functionality in the OS. 似乎最近的文章都将重点放在此功能上,作为添加链接的功能,这些链接将利用OS的新功能将网站作为全屏应用程序启动。

This is not what I'm trying to do; 这不是我想做的; I would like to add a simple, labelled icon to the home screen and have it launch the web page in a browser. 我想在主屏幕上添加一个简单的,带有标签的图标,并使其在浏览器中启动网页。

Currently, I believe that this is done with these elements in the head block: 目前,我相信这是通过head块中的以下元素完成的:

<link rel="apple-touch-icon" href="/img/apple-touch-icon.png">
<link rel="apple-touch-icon-precomposed" href="/img/apple-touch-icon.png">
<meta name="apple-mobile-web-app-title" content="MyIconLabel">
<meta name="application-name" content="MyIconLabel">

...for both iOS and Android. ...适用于iOS和Android。

Is this correct as of October 2017? 截至2017年10月,这是否正确?

Note: The website I am adding the customised home screen label and icon to are not progressive web sites, just regular web sites which I would like to launch from user's home screens. 注意:我要添加自定义主屏幕标签和图标的网站不是渐进式网站,而是我想从用户主屏幕启动的常规网站。

Some links I've drawn from: 我从中得出的一些链接:

Found that the instructions on this site provided the required manifest file and inclusion directions: 发现此站点上的说明提供了必需的清单文件和包含说明:

https://realfavicongenerator.net/ https://realfavicongenerator.net/

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

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