react-native-branch-deep-linking-attribution
react-native-branch-deep-linking-attribution copied to clipboard
[Android] Branch link is always opening up the google playstore.
I have set up react-native branch SDK properly step by step. Everything is working fine on iOS. While testing android, it seems that when user clicks on the link it will redirect them to the play store even if they have the app on their phones. Even my params are coming fine when the user is coming through the play store.
My question is why are users going to the play store if they have the app? What am I doing wrong here? Thanks!
I have noticed that if I use quick links from the branch dashboard I have that wrong behavior whereas if I create a deep link programmatically like the following, it works fine. This means that the link does not open play store first rather it will open up the app directly.
let branchUniversalObject = await branch.createBranchUniversalObject('canonicalIdentifier', {
locallyIndex: true,
title: 'Cool Content!',
contentDescription: 'Cool Content Description',
contentMetadata: {
ratingAverage: 4.2,
customMetadata: {
prop1: 'test',
prop2: 'abc'
}
}
})
let {url} = await branchUniversalObject.generateShortUrl(linkProperties, `controlParams)`
Did you find any solution?
Hi all,
With the release of Android API 31 there have been enforcements with verifications for Android App Links and URI schemes.
I would recommend to confirm all your build flavors package names and SHA Certs are declared in your Branch domains (app.link) Assetlinks file (.app.ink/.well-known/assetlinks.json).
Additionally if you utilize urls in your link data for params like $canonical_url, $original_url, $fallback_url, $android_url, etc, we scrape those sites for og tags as well as deeplink paths, therefore we utilize those paths for your uri scheme host. I would also confirm all possible deeplink paths are properly delcared for your uri scheme intent filter in your manifest, or utilize a wildcard (*) as your host for your uri scheme intent-filter declaration.
I had the same issue and fixed it. What was missing for me in the Branch Configure page:
- Android URI Scheme was wrong 😅
- SHA256 Cert Fingerprints was wrong 😅
I made a minor change my app's AndroidManifest.xml, which I'm not sure does anything, but followed the Android App Links docs (putting android:scheme and android:host in two separate data tags instead of in the same one):
- <data android:scheme="https" android:host="xxx.app.link" />
+ <data android:scheme="https" />
+ <data android:host="xxx.app.link" />
Appreciate the info @samzmann! For others experiencing integration issues please open a support ticket: https://help.branch.io/using-branch/page/submit-a-ticket
Thanks