'Android app link not working in android 12 always opening in browser
I have hosted assetlinks file into our domain https://ourdomain/.well-known/assetlinks.json And also verified this using https://developers.google.com/digital-asset-links/tools/generator and from android studio's App Links Assitant and got verified status from both the ways. But when i am sharing debug APK for testing it's always opening in browser. I also tried uploading on app store and downloaded from there for testing but it always open in browser.
Note: for debug build used my laptop SHA-256 and once app live on play store changed SHA ( got SHA-256from By going to Application Dashboard in Play Console then Release Management --> App Signing ) on hosted assetlinks file into our domain https://ourdomain/.well-known/assetlinks.json
Below is the code used in the manifest file.
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="abc.test.com" />
</intent-filter>
Solution 1:[1]
Deep-links
are working in Android 11
or before but on Android 12
it isn't.
But even after adding assetlinks.json
file and adding all the intent-filters
. Android 12
still isn't detecting deep-links
. In Android-Manifest
file turns out that scheme's tag
is need to be separated from the data tag like this:
// OLD - Which is only working Android 11 or before
<data
android:host="domain.name"
android:pathPrefix="/videos"
android:scheme="https" />
// NEW - Which is working on all including Android 12
<data android:scheme="https" />
<data
android:host="domain.name"
android:pathPrefix="/videos" />
Solution 2:[2]
I have same problem and solved by going to app info setting -> set as default ->support web addresses and you will see your short link so turn it on and it will work ;)
Update:
as every one said its not a programmatically way so the best way is that link below said
Solution 3:[3]
You need to add deep link verification. See https://doordash.engineering/2022/01/25/your-deep-links-might-be-broken-web-intents-and-android-12/
Solution 4:[4]
In my case, the app is working in android 11, but it doesn't work in android 12 when the app is compiled and built with android studio.
I tested the production app; it works fine with the app link.
For development build, I have to go to App info -> Open by default -> Add link -> check off all the available links
This seems only happen with development builds; the apps installed from Google app store automatically has all the links selected.
Solution 5:[5]
After adding assetlinks.json in domain you have to reinstall app (just uninstall the app and install again) that will work
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Shafiq ur Rehman |
Solution 2 | |
Solution 3 | Bob der Baumeister |
Solution 4 | Eric Cen |
Solution 5 | Vinay Rathod |