【问题标题】:TWA app generated using the bubblewrap opens in browser instead of as an app使用 bubblewrap 生成的 TWA 应用程序在浏览器中打开,而不是作为应用程序打开
【发布时间】:2022-06-15 02:42:17
【问题描述】:

创建 PWA 以在 google play 商店上发布。使用bubblewrap cli 生成的 apk 安装良好,但在 google 应用程序中打开时像常规网站一样,而不是独立应用程序。它的顶部有一个网址栏。请参考截图。

那么,如何创建一个看起来像普通安卓应用的应用呢?

附上截图和twa-manifest.json和网站的manifest.json文件

注意:链接是假的

// twa-manifest.json

{
  "packageId": "app.web.facpro.twa",
  "host": "facpro.web.app",
  "name": "FACPRO - Faculty Research Progress",
  "launcherName": "FACPRO",
  "display": "fullscreen",
  "themeColor": "#FFFFFF",
  "navigationColor": "#000000",
  "navigationColorDark": "#000000",
  "navigationDividerColor": "#000000",
  "navigationDividerColorDark": "#000000",
  "backgroundColor": "#FFFFFF",
  "enableNotifications": true,
  "startUrl": "/",
  "iconUrl": "https://facpro.web.app/logo512.png",
  "maskableIconUrl": "https://facpro.web.app/maskable_icon_x512.png",
  "splashScreenFadeOutDuration": 300,
  "signingKey": {
    "path": "/path/to/android.keystore",
    "alias": "android"
  },
  "appVersionName": "1",
  "appVersionCode": 1,
  "shortcuts": [],
  "generatorApp": "bubblewrap-cli",
  "webManifestUrl": "https://facpro.web.app/manifest.json",
  "fallbackType": "customtabs",
  "features": {},
  "alphaDependencies": {
    "enabled": false
  },
  "enableSiteSettingsShortcut": true,
  "isChromeOSOnly": false,
  "orientation": "default",
  "fingerprints": [],
  "additionalTrustedOrigins": [],
  "retainedBundles": [],
  "appVersion": "1"
}
manifest.json

{
  "short_name": "FACPRO",
  "name": "FACPRO - Faculty Research Progress",
  "icons": [
    {
      "src": "favicon.ico",
      "sizes": "64x64 32x32 24x24 16x16",
      "type": "image/x-icon"
    },
    {
      "src": "logo192.png",
      "type": "image/png",
      "sizes": "192x192"
    },
    {
      "src": "logo512.png",
      "type": "image/png",
      "sizes": "512x512"
    },
    {
      "src": "maskable_icon_x512.png",
      "type": "image/png",
      "sizes": "512x512",
      "purpose": "any maskable"
    }
  ],
  "start_url": ".",
  "display": "standalone",
  "theme_color": "#ffffff",
  "background_color": "#ffffff"
}

【问题讨论】:

    标签: android progressive-web-apps trusted-web-activity bubblewrap


    【解决方案1】:

    遇到同样的问题,请问你解决了吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-12
      • 1970-01-01
      • 2019-04-05
      • 2016-09-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多