除起始页外,无法删除TWA Progressive Web App中域的应用程序URL栏

时间:2019-08-28 19:38:36

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

我直接通过此google页面上的指南创建了TWA渐进式Web应用程序:
https://developers.google.com/web/updates/2019/02/using-twa
并完全按照Google网站上的说明在应用程序中的资产声明和我的两个域中的assetlinks.json中添加了资产。

打开应用程序时,没有显示的应用程序URL栏。但是,如果我单击链接转到第二个域,则会显示URL栏。

在两个域之间导航时,如何使URL栏保持隐藏状态?

这是我在应用程序中域和asset_statements上/.well-known/下的assetlinks.json ---
assetlinks.json:


    [{
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target": {
    "namespace": "android_app",
    "package_name": "com.exdomain.exsub.app",
    "sha256_cert_fingerprints": ["59:81:22:DC:B0:16:95:A4:2D:F3:47:16:2A:9D:F6:63:E0:D2:99:DD:36:ED:9C:ED:6B:C6:39:4A:89:E3:E9:24"]
    }
    }]

app asset_statements:


    [{
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target": {
    "namespace": "web",
    "site": "https://first.exsub.exdomain.com"
    }
    },
    {
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target": {
    "namespace": "web",
    "site": "https://second.exsub.exdomain.com"
    }
    }]

1 个答案:

答案 0 :(得分:0)

您需要将“受信任的Web活动”配置为多源。这是说明方法的文档:https://developers.google.com/web/android/trusted-web-activity/multi-origin