I'm trying to implement deep links for an Android app. The problem is that whenever an user presses one of the links under the domains associated with the app, the web browser opens instead.
The app was developed with React Native and bundled via Expo.
This is the relevant bit of the app.config.js file of the Expo app:
intentFilters: [
{
action: 'VIEW',
autoVerify: true,
data: [
{
scheme: 'https',
host: 'centrito.co',
pathPrefix: '/products',
},
],
category: ['BROWSABLE', 'DEFAULT'],
},
{
action: 'VIEW',
autoVerify: true,
data: [
{
scheme: 'https',
host: 'www.centrito.co',
pathPrefix: '/products',
},
],
category: ['BROWSABLE', 'DEFAULT'],
},
{
action: 'VIEW',
autoVerify: true,
data: [
{
scheme: 'https',
host: 'centrito.co',
pathPrefix: '/account/orders',
},
],
category: ['BROWSABLE', 'DEFAULT'],
},
{
action: 'VIEW',
autoVerify: true,
data: [
{
scheme: 'https',
host: 'www.centrito.co',
pathPrefix: '/account/orders',
},
],
category: ['BROWSABLE', 'DEFAULT'],
},
],
And this is the content of assetlinks.json:
[
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.centrito.app",
"sha256_cert_fingerprints":
["4F:7A:AD:EC:06:9C:BA:A3:FD:A6:96:77:7B:8C:6C:C8:17:95:09:C0:59:8D:83:A3:F4:1A:B9:5E:C9:6F:CA:FD"]
}
}
]
Some relevant facts:
- The deep links actually did work previously but stopped working altogether at an unknown date.
- The links can be manually associated with my app in Android settings. This is not optimal for end users.
- This tool indicates that the app and the domain are indeed linked via those deep-links.
- Executing
curl -Ito the supported domains to request the/.well-known/assetlinks.jsonand responses with status code 200 are returned so server configurations and redirections are not the culprits, most likely.
While debugging, I extracted the following information:
- Executing
adb logcatwhile installing the app doesn't yield any information about the auto verification process. - Whenever I try to manually re-verify and check with the commands
adb shell pm verify-app-links --re-verify com.centrito.appandadb shell pm get-app-links com.centrito.appnothing gets printed in the console.
Given all those previous data points, I'm thinking that the auto verification process is not happening at all. What other reasons could possibly expain this weird behaviour? Could Google be at fault for this?