简体   繁体   English

Chrome 徽章显示在已安装 PWA 的“添加到主屏幕”上(仅安装快捷方式)

[英]Chrome Badge shows on 'Add To Homescreen' installed PWA (Only shortcut is installing)

We have a PWA that will not install and instead only adds a shortcut to home screen (with Chrome badge on app icon).我们有一个不会安装的 PWA,而只会添加一个到主屏幕的快捷方式(在应用程序图标上带有 Chrome 徽章)。

A lighthouse audit gives 3/3 100% (Uses HTTPS, Registers a Service Worker, Manifest meets installability requirements) for Installable stating "Browsers can proactively prompt users to add your app to their homescreen, which can lead to higher engagement."灯塔审核给出 3/3 100%(使用 HTTPS,注册 Service Worker,Manifest 满足可安装性要求)可安装说明“浏览器可以主动提示用户将您的应用添加到他们的主屏幕,这可以提高参与度。”

The "Add XXX to Home screen" banner DOES show and beforeinstallprompt is triggered, but it always creates a shortcut and not an app install. “将 XXX 添加到主屏幕”横幅确实显示并且 beforeinstallprompt 被触发,但它总是创建一个快捷方式而不是应用程序安装。

We have tried on the 3 Android devices we have here (Galaxy S10, Galaxy S4 Mini, Galaxy S7, 9.0, 9.0, 4.4) as well as across many devices on Browserstack and always have the same issue.我们已经尝试过我们在这里拥有的 3 台 Android 设备(Galaxy S10、Galaxy S4 Mini、Galaxy S7、9.0、9.0、4.4)以及 Browserstack 上的许多设备,并且总是遇到同样的问题。

Has anyone come across this issue before?有没有人遇到过这个问题? What can be done to further test or resolve it?可以做些什么来进一步测试或解决它?

If you are not signed into Google Play on the device apps will only install as shortcuts.如果您未在设备上登录 Google Play,应用程序将仅作为快捷方式安装。 Singing into Google Play resolved the problem.在 Google Play 中唱歌解决了这个问题。

This answer in another thread solved my issue:另一个线程中的这个答案解决了我的问题:

https://stackoverflow.com/a/59733298/1483075 https://stackoverflow.com/a/59733298/1483075

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

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