gpt4 book ai didi

progressive-web-apps - 设置 PWA 的窗口标题和图标

转载 作者:行者123 更新时间:2023-12-04 11:02:13 24 4
gpt4 key购买 nike

我正在将我的网站变成 PWA,并完成了使其可下载的步骤,在主屏幕上有自己的图标。

但是,我找不到关于如何设置窗口标题和图标的任何文档,因为它目前是 chrome 的图标并命名为 Application ... .这可能吗,如果可以,我该如何实现?

该应用程序的 list :

{
"name": "AppName",
"short_name": "AppName",
"lang": "en-US",
"start_url": "/",
"display": "standalone",
"background_color": "white",
"theme_color": "black",
"icons": [{
"src": "../content/themes/AppName/images/fuzz.png",
"sizes": "512x512",
"type": "image/png"
}]
}

Android 中的应用程序窗口(窗口内容为 出于隐私原因删除 ):

最佳答案

某些 Android 发行版不会在应用切换器中显示 PWA 名称和图标,您可以转到已知良好的 PWA 以检查您的发行版是否是其中之一。

来自 Airhorner 的示例 list :

{
"name": "The Air Horner",
"short_name": "Airhorner",
"description": "The world's best airhorner, and it's free",
"icons": [
{
"src": "/images/touch/android-launchericon-48-48.png",
"type": "image/png",
"sizes": "48x48"
},

{
"src": "/images/touch/android-launchericon-72-72.png",
"type": "image/png",
"sizes": "72x72"
},
{
"src": "/images/touch/android-launchericon-96-96.png",
"type": "image/png",
"sizes": "96x96"
},
{
"src": "/images/touch/android-launchericon-144-144.png",
"type": "image/png",
"sizes": "144x144"
},
{
"src": "/images/touch/android-launchericon-192-192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "/images/touch/android-launchericon-512-512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": "/?homescreen=1",
"scope": "/",
"display": "standalone",
"background_color": "#2196F3",
"theme_color": "#2196F3"
}

Pixel 启动器上的结果:
enter image description here

关于progressive-web-apps - 设置 PWA 的窗口标题和图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58732953/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com