问题
I created a progressive web app, and it works perfectly. It prompts for installation and it saves the link on the android home and it shows no url address bar.
Then I used PWA2APK (https://appmaker.xyz/pwa-to-apk/) to create an APK and deploy on play store.
Once built, I downloaded the assetlinks.json, added the certificate SHA-256 modifying the assetlinks.json in this way (I changed values):
[
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "xyz.appmaker.pblx",
"sha256_cert_fingerprints": ["AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA","SHA256: BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB"]
}
}
]
Then I pushed it online, and verified that www.exemple.com/.well-known/assetlinks.json show the values in the browser.
The package name is the same of the APK, and the SHA-256 is the Application signing certificate.
I also added icons, screen capture and all the necessary stuff. the total workflow is validated. So once deployed a version for an internal test, I expected it to work correctly, but it doesn't. The application is installed with a default icon, it shows the rl address bar and it has some load problems.
Did anybody experienced the same issues? How did you solve it?
Thanks.
回答1:
I am part of the team that build this tool. And as for the question, this can be solved by removing SHA256 from following.
Before:
"sha256_cert_fingerprints": ["AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA","SHA256: BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB"]
After
"sha256_cert_fingerprints": ["AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA","BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB"]
This should fix the issues you had with the address bar.
And yes, feel free to reach out in support forum anytime. Happy to help and thanks for using PWA2APK
回答2:
This is just speculation, but are you using Google Play App Signing? With Google Play App Signing the app certificate should be the one Google signs your app with, not the one you sign with to upload to Google. The documentation is here. Specifically it says, under step 3 of the "New Apps" section.
Step 3: Register your app signing key with API providers If your app uses any APIs, you usually need to register the certificate of the key Google signs your app with for authentication purposes using the fingerprint of the certificate. Here’s where to find the certificate:
- Sign in to your Play Console.
- Select an app.
- At the left menu, select Release management > App signing.
- Copy the fingerprints (MD5, SHA-1 and SHA-256) of your app signing certificate.
- If the API provider requires a different type of fingerprint, you can also download the original certificate in .der format and convert it using the transformation tools that the API provider requires.
If you get the SHA-256 as described above and put it in your JSON instead it might work.
来源:https://stackoverflow.com/questions/55879894/pwa2apk-on-play-store-is-still-showing-url