I have setup assetlinks.json
and AndroidManifest.xml
so that the desired App Links are verified in all previous versions of Android. However, the verification no longer works in Android 12 (currently Beta 2). adb shell pm get-app-links <PACKAGE_NAME>
returns legacy_failure
.
There seems to be some changes for App Links verification in Android 12, but the documentation isn't very explicit about what needs to be changed and whether the change is backward compatible.
Turns out that if you break
<data android:scheme="http" android:host="www.example.com" />
into 2 tags
<data android:scheme="http" />
<data android:host="www.example.com" />
in AndroidManifest.xml
, the app link will get verified successfully on Android 12. This change also seems backward compatible on older versions of Android, even though the documentation didn't say so explicitly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With