0

It has been a week now searching for a way to make TWA application that is made by PWA and uploaded to google store working in immersive mode.

according to https://bugs.chromium.org/p/chromium/issues/detail?id=965329 this thing is implemented starting from chrome version 80, but I can't find a way to implement it!

I've made the digital asset and validate it on both google tool and Peter's Asset Link Tool

My digital asset code hosted https://mal-war.com/.well-known/assetlinks.json :

[
{
    "relation": [
        "delegate_permission/common.handle_all_urls"
    ],
    "target": {
        "namespace": "android_app",
        "package_name": "com.example.maliciouswar",
        "sha256_cert_fingerprints": [
            "F7:AC:EF:00:9B:58:E0:63:81:CA:5C:D0:7B:68:B8:90:9B:DD:BA:A8:3A:08:87:27:3E:81:38:66:CB:55:DC:39"
        ]
    }
}

]

and in the string.xml on the

<resources>
    <string name="app_name">Malicious War</string>
    <string name="asset_statements">
        [{
            \"relation\": [\"delegate_permission/common.handle_all_urls\"],
            \"target\": {
                \"namespace\": \"web\",
                \"site\": \"https://mal-war.com\"}
        }]
    </string>
</resources>

I also tried to use https://www.pwabuilder.com/ , but also didn't work in immorsive mode on both my android device and emulator.

shamaseen
  • 2,193
  • 2
  • 21
  • 35

1 Answers1

0

I finaly found the solution, is by adding this line:

            <meta-data android:name="android.support.customtabs.trusted.DISPLAY_MODE"
            android:value="immersive"/>

to AndroidManifest.xml

and there are other great meta tags too, you can find them here.

shamaseen
  • 2,193
  • 2
  • 21
  • 35