intentFilters autoverify:true is not working (Android)

Hello!

I am trying that when opening a deep link the dialog does not open. But it always shows me the dialog to choose an app to open the link.

I have this:

  1. SDK Version: 46
  2. Platforms(Android/iOS/web/all): Android/ iOS

app.json

...
"package": "com.myapp.myapp",
      "intentFilters": [
        {
          "action": "VIEW",
          "autoVerify": true,
          "data": [
            {
              "scheme": "https",
              "host": "myapp.io",
            }
          ],
          "category": [
            "BROWSABLE",
            "DEFAULT"
          ]
        },
...

.well-known/assetlinks.json

[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target" : { "namespace": "android_app", "package_name": "com.myapp.myapp",
               "sha256_cert_fingerprints": ["SHA CERT FINGERPRINTS_1", "SHA CERT FINGERPRINTS_2"] }
}]

I have 2 apps, that’s why I have 2 sha256_cert_fingerprints.

What am I doing wrong? Why doesn’t autoverify:true work?

Hi @tatianao,

Are you using Android 12 or above? There is a known issue that persists for App Links on Android.

I’m linking documentation here for more information on what might be the root cause and also the solution to solve it. Please have a look.

Hi! I’m using Android 10

As you mentioned before that you have multiple apps, you will have to format .well-known/asetlinks.json file as per Android’s documentation here.

The format of the file you shared seems to have multiple "sha256_cert_fingerprints" associated with the same app.

In my case, the package_name is the same in both apps, because one is in producton and the another is development.

In the example the packages are different, should i do it like the example even though my package_name is the same?

Like this?

[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target" : 
{ 
   "namespace": "android_app", 
    "package_name": "com.myapp.myapp",
    "sha256_cert_fingerprints": ["SHA CERT FINGERPRINTS_1"
]},
{
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target": {
      "namespace": "android_app",
      "package_name": "com.myapp.myapp",
      "sha256_cert_fingerprints":
      ["SHA CERT FINGERPRINTS_2"]
    }



]


Hey @amanhimself, why is auto verify not set to true by default? links literally wont work on newer android versions without it, seems like a footgun for future devs

It seems the sha256_cert_fingerprints per target only accepts one fingerprint. Also, I’d suggest taking a look at this video from Android team where they show an example in which they have a locally signed version of the app and Play store signed version. Both version of the apps share the same package_name.

Hey @iway1, I am not sure about that. Will investigate and get back to you.

1 Like

Any news on this?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.