用户添加到主屏幕后的 PWA 更新图标 [英] PWA update icon after user add to homescreen

查看:86
本文介绍了用户添加到主屏幕后的 PWA 更新图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改我的应用图标.我试过改变它,但应用程序图标(已添加到主屏幕或安装在应用程序抽屉上)没有改变.

I want to change my app icon. I've tried changed it but the app icon (already add to homescreen or installed on app drawer) not change.

这是我的 manifest.json

Here is my manifest.json

{
  "short_name": "React App",
  "name": "Create React App Sample",
  "icons": [
    {
      "src": "favicon.ico",
      "sizes": "64x64 32x32 24x24 16x16",
      "type": "image/x-icon"
    },
    {
        "src": "react.png",
        "sizes": "144x144",
        "type": "image/png"
    }
  ],
  "start_url": "./index.html",
  "display": "standalone",
  "theme_color": "#000000",
  "background_color": "#ffffff"
}

我更改了 144x144 大小的名称和图标,但没有任何反应.

I've changed the name and icons on size 144x144 but nothing happened.

用户添加到主屏幕后,我可以更改应用图标吗?

Can I change the app icon after user add to home screen?

我已阅读提示:图标可能会被缓存,因此在更新图标或其他图形时更改文件名可能会有所帮助.但等待 24 小时,图标直到现在都不会改变.

I've read Tip: Icons may be cached, so it may be helpful to change the filenames when updating icons or other graphics. but wait for 24 hours, the icon never change until now.

推荐答案

PWA 图标仅在安装方法为 WebAPK.如果它是旧版本的 PWA,在不受支持的平台上,或者不符合 标准 那么它只是一个 Android 操作系统书签.浏览器不知道何时更新操作系统书签上的图标.

PWA icons are only updated when the instal method is a WebAPK. If it is an older version of of PWA, on an unsupported platform, or does not meet the criteria for WebAPK then it will just an Android OS bookmark. Browser doesn't know when to update the icon on OS bookmarks.

检查 Android 设置(而不是抽屉)中已安装应用的列表,如果您的 PWA 未在此处列出,则无法更新图像.

Check the list of installed apps in Android's settings (not the drawer) and if your PWA isn't listed there it can't update the image.

这篇关于用户添加到主屏幕后的 PWA 更新图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆