'Deep link not working in Android 12 after publish assetlinks.json to domain and also put autoverify true in intent filter Android
I know this question is asked before but I didn't find any correct answer that solve my issue
Deep link is working on android 11 or lower device but not working in android 12 device
Here example.com is for understanding
Pls check below code for open activity by deep link
<activity
android:name=".splash.SplashActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<data
android:host="example.com"
android:scheme="https" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
I also put meta data thing for deep link
<meta-data
android:name="asset_statements"
android:resource="@string/asset_statements"/>
<string name="asset_statements" translatable="false">[{\"include\": \"https://example.com/.well-known/assetlinks.json\"}]</string>
I also check that assetlinks.json file is valid or not by using this link
https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://example.com&relation=delegate_permission/common.handle_all_urls
And there is no error that shows the json file is incorrect
Our assetlinks.json file is like this
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "example.com",
"sha256_cert_fingerprints":
["9C:BC:79:E2:77:18:E4:23:F9:5B:B2:5A:...",
"E4:37:19:8A:52:A9:6E:7C:A0:DE:62:FA:..",
"15:39:35:57:FB:8E:A9:40:84:8C:3E:E7:..."
]
}
},
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "example.com.developement",
"sha256_cert_fingerprints":
["9C:BC:79:E2:77:18:E4:23:F9:5B:B2:5A:5A:9E:..",
"15:39:35:57:FB:8E:A9:40:84:8C:3E:E7:DF:9B:..."]
}
},{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "example.com.qa",
"sha256_cert_fingerprints":
["9C:BC:79:E2:77:18:E4:23:F9:5B:B2:5A:5A:9E..",
"15:39:35:57:FB:8E:A9:40:84:8C:3E:E7:DF:9B:6D:..."
]
}
}]
WE get our sha256 key from google play console -> App integrity -> App signing and from android studio gradle -> gradle signingReport
Pls give suggestions what we're doing wrong, This is not working in android 12 device it's open the link in default browser but working in android 11 or lower device
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
