1

If I use a wildcard to define deeplinking in Android 12 does not work it fails with legacy_failure if I run pm get-app-links com.example.app in adb shell but if I use a specific domain, the it works. So if I use

<data android:host="*.example.com" android:pathPrefix="/profile/" />

it gives me legacy_failure

but if I use

<data android:host="www.example.com" android:pathPrefix="/profile/" />

it works fine, and verifies. Wildcard usage should be possible based on documentation, and it worked in previous versions ( if I fun my app on a device with < 12 version of android it works just fine )

https://developer.android.com/training/app-links/verify-site-associations#multi-subdomain

I need to catch every subdomain, because we have a lot for this project - any idea how can I overcome this is much appreciated :)

( I made sure that everything from https://developer.android.com/training/app-links/verify-site-associations is correct )

bboldi
  • 23
  • 6
  • Are you sure that [your `assetlinks.json` is served without redirects](https://issuetracker.google.com/issues/171819080)? – CommonsWare Apr 01 '22 at 15:16
  • THIS ^ Thanks @CommonsWare , that was the problem - I've been looking at the documentation for hours, and missed that. Kudos! – bboldi Apr 04 '22 at 16:07

1 Answers1

1

The assetlinks.json file is supposed to be served directly, without redirects. Apparently, in some scenarios, the redirect is OK, but not in other scenarios. Somebody else ran into the same problem as you, and the redirect was the culprit.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491