PWA 从 Play 商店安装时没有全屏,但从浏览器添加时工作正常

问题描述 投票:0回答:0

所以我在前端使用 reacT.js 制作了一个 PWA 应用程序,并设法将该应用程序放到了 playstore 上。问题是,当从 Playstore 安装应用程序或仅通过发送 APK 安装应用程序时,它会显示浏览器地址栏。但是,如果我只是使用添加到主屏幕功能从浏览器添加网络应用程序,它会删除地址栏并像本机应用程序一样打开它。


{
  "name": "dama",
  "short_name": "dama",
  "theme_color": "#ff4c01",
  "background_color": "#2C2C37",
  "display": "standalone",
  "permissions": ["fullscreen"],
  "orientation": "portrait",
  "scope": "/",
  "start_url": "/",
  "icons": [
    {
      "src": "192.png",
      "sizes": "192x192",
      "type": "image/png",
      "purpose": "maskable"
    },
    {
      "src": "1024.png",
      "type": "image/png",
      "purpose": "any"
    },
    {
      "src": "maskable.png",
      "sizes": "192x192",
      "type": "image/png",
      "purpose": "maskable"
    },
    {
      "src": "logo192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "logo256.png",
      "sizes": "256x256",
      "type": "image/png"
    },
    {
      "src": "logo384.png",
      "sizes": "384x384",
      "type": "image/png"
    },
    {
      "src": "logo512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ],
  "description": "Join the fun at Dama! Challenge your friends or try your hand at playing against our smart AI. Experience endless hours of fun as you strategize to capture all your opponent's pieces and win the game."
}

我尝试研究可能的解决方案,例如添加“权限”:

["fullscreen"], 

"android": {
    "theme_color": "#ff4c01",
    "package_name": "com.example.dama"
  }
```  to the manifest file, and it still does not work.  Does anyone have a solution for this ?
reactjs frontend progressive-web-apps manifest
© www.soinside.com 2019 - 2024. All rights reserved.