I'm trying to to setup a Digital asset link from my website to my app, but I can't get it to work. I made sure the intent-filter was present in my manifest and I uploaded a assetlinks.json file using my Play store signing SHA 256 fingerprint, tested it with Google's statement list and it returned successfuly.
While going through verification steps again, I checked my device's app links with adb -d shell pm get-app-links --user current com.example.app and I realized that my app link didn't have a signature. I'm guessing that's its probably the reason the app can't link to my website since it can't compare a signature to the fingerprints given in the assetlinks.json hosted on my site's server.
My app link
com.example.app 01234567-89ab-cdef-0123-456789abcdef:
User 0:
Verification link handling allowed: true
Selection state:
Enabled:
com.example.app
Compared to another
com.google.android.youtube:
ID: 01234567-89ab-cdef-0123-456789abcdef
Signatures: [<has-some-SHA256-certificate-fingerprints-here>]
Domain verification state:
youtu.be: system_configured
m.youtube.com: system_configured
youtube.com: system_configured
www.youtube.com: system_configured
User 0:
Verification link handling allowed: true
Selection state:
Disabled:
youtu.be
m.youtube.com
youtube.com
www.youtube.com
For some reason, my app link doesn't have the same format as most of the other links, more importantly doesn't have a signature, and I can't figure out why. However I tried installing it, it always gave the same results. I tried installing it:
- From the Play store's internal testing
- From a signed apk downloaded from the
App bundle explorer - From the signed apk we normally upload to the Play store
- From a manually signed apk built on my local machine
Has anyone any idea what I'm missing?
I managed to find the solution to my problem. Turns out my
intent-filterhad multiple emptydatatags which seemed to prevent my app to detect the website.I forgot to specify that I'm my app's
AndroidManifestis built by Cordova since I'm using Ionic. So I cannot edit myAndroidManifestdirectly. I have to use theionic-plugin-deeplinksplugin.The problem is, the ionic plugin generates an
intent-filterwith the data given in thepackage.jsonwith the following format.This format is automatically generated by the plugin and adds multiple host/scheme/prefix to allow support of multiple addresses. However I'm using only one address, so when I'm generating the
AndroidManifestwith the plugin, it generates anintent-filterwith many emptydatatags in it.As of now the only way I managed to remove the extra
datatags was to fork the plugin's repository and remove thepackage.jsonextra properties from the plugin. It looks like this:Which generates this
intent-filterthat is working has intented: