webapp中添加了manifest.json,文件格式如下,可是每次都是手动添加到主屏,如何主动添加呢?
{
"start_url": "/?utm_source=homescreen",
"name": "掌上应用",
"short_name": "掌上应用",
"icons": [
{
"src": "img/icons/Icon-512.png",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "img/icons/Icon-192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "img/icons/Icon-180.png",
"type": "image/png",
"sizes": "180x180"
},
{
"src": "img/icons/Icon-152.png",
"type": "image/png",
"sizes": "152x152"
}
],
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2b5e93"
}
有提示的的,新浪微博会提示添加主屏幕,这个功能肯定要用户主动操作,要不然一瞬间屏幕全是图标,能烦死