Reputation: 732
The deep linking feature of my app was working fine with Android 11. But it is not working in Android 12. I checked and followed several StackOverflow posts and some other blogs. But I am getting the links unchecked in the app details
If I manually check it, the deep linking will work.
I tried manual verification by using the documentation and getting legacy_failure
error.
https://developer.android.com/training/app-links/verify-site-associations#manual-verification
I followed this URL too https://doordash.engineering/2022/01/25/your-deep-links-might-be-broken-web-intents-and-android-12/comment-page-1/?unapproved=40015&moderation-hash=dc9e7df0845c5072330edc78f75ca497#comments .
Upvotes: 7
Views: 7793
Reputation: 1089
This approach should solve deeplink issue on android 12 above
Automatic approach
skip step 1 & 2
Go to Tools/ App Link Assistance and follow the step on the image
Manual Approach
Step 1: update all intent filters that can respond to an HTTP link with the android:autoVerify="true"
<activity
android:name="com.example.MainActivity">
<intent-filter android:autoVerify="true">
</intent-filter>
</activity>
Step 2: Create the assetlinks.json file and update your package and sha key
//update package_name and sha256_cert_fingerprints with yours
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "Your App’s package name",
"sha256_cert_fingerprints": ["Your App’s SHA256 finger print"]
}
}]
Step 3: Publishing the JSON verification file Work with your infrastructure team to deploy the assetlinks.json file to the host
https://your domain.com/.well-known/assetlinks.json
Be sure of the following:
Upvotes: 4