I created my app using TWA. While installing the apk directly it was working fine. No URL header was there, the website loaded without any header. but after I released it in playstore when people download the app from playstore there is a URL header in my app. My .well-known/assetlinks.json is configured in my host. any fix?
Asked
Active
Viewed 292 times
1 Answers
2
If you opted into Play App signing, Play will generate a different key to sign the APK downloaded to users devices.
You can get the SHA-256 from Play in using one of the approaches below:
- Using the Asset Links Tool
- Install the Asset Link Tool from Google Play.
- Download your app from the Google Play.
- Launch the Asset Links Tool.
- When the app launches, you'll be given a list of all applications installed on your device by applicationId. Filter the list by the applicationId you chose earlier and click on that entry.
- You'll see a page listing your app's signature and with a generated Digital Asset Link. Click on the Copy or Share buttons at the bottom to export it however you like (e.g., save to Google Keep, email it to yourself).
- or, from the Google Play console:
- Open the Google Play Console.
- Select your app.
- Choose Release management and then App signing from the panel on the left.
- Copy the SHA-256 certificate fingerprint from under the App signing certificate section.
- Use this value in your Digital Asset Link file.
You can then either replace the fingerprint in your assetlinks.json
or keep both fingerprints (which makes testing the build locally easier). An assetlinks file with both fingerprints looks like the following:
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.appspot.pwa_directory",
"sha256_cert_fingerprints": [
"FA:2A:03:CB:38:9C:F3:BE:28:E3:CA:7F:DA:2E:FA:4F:4A:96:F3:BC:45:2C:08:A2:16:A1:5D:FD:AB:46:BC:9D"
]
}
},{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.appspot.pwa_directory",
"sha256_cert_fingerprints": [
"4F:FF:49:FF:C6:1A:22:E3:BB:6F:E6:E1:E6:5B:40:17:55:C0:A9:F9:02:D9:BF:28:38:0B:AE:A7:46:A0:61:8C"
]
}
}]
You can read more about both subjects on the quick start guide in the official docs.

andreban
- 4,621
- 1
- 20
- 49