We have a few intent-filters
defined in AndroidManifest
for deeplinks. We also have assetlinks.json
file placed on our domain at proper location with correct SHA fingerprints. We are facing a weird issue where these App links open our app directly without any chooser in between when app is installed from Android Studio.
Which is also desired behaviour, but, when we upload our app to Google play and download from there these App links open App chooser
first which is not desired behaviour.
We did some experimentation like creating different intent filters for two different links, removing one link etc but this behaviour remains same. Also double checked SHA fingerprints, they seemed to be fine.
If you're saying that you have your assetlinks.json
file at a proper location, and the JSON itself has correct statements. Then there can be two issues
Check whether you've added autoVerify=true
in your AndroidManifest.xml
file for the activity in which you've defined the intent filter.
Recheck the signed apk's SHA256
to confirm you're using correct SHA256
to sign your apk. You can check that using the command
keytool -list -printcert -jarfile <your_signed.apk>
and verify that the same SHA256
is present in your assetlinks.json file.
./adb shell dumpsys package domain-preferred-apps
The output would be like:
Package: com.test.example
Domains: www.test.com
Status: always : 200000000
Package: com.test.example
Domains: www.xyz.com
Status: ask
.
.
.
Find your app's package name, then check the Status
for your package name, if it is always : <some_number>
then your apk is correctly verified and the app link should work alright, otherwise if value of Status
is ask
or undefined
, then there is some issue which you can refactor following the above-mentioned steps.