android-branch-deep-linking-attribution
android-branch-deep-linking-attribution copied to clipboard
Branch SDK Deep Linking does not work when Tracking is disabled
Describe the bug
When the app is closed, the links open it but the Referral Parameters returned by public InitSessionBuilder withCallback(BranchReferralInitListener callback) are set to: {"+clicked_branch_link":false,"+is_first_session":false}. When the app is already running in the background, it sometimes returns the same {"+clicked_branch_link":false,"+is_first_session":false}, and sometimes it returns the parameters of an old Deep Link I clicked previously, but not the most recent one.
Steps to reproduce
- Set
Branch.getInstance().disableTracking(true). - Close the app.
- Open a deep link.
BranchReferralInitListenerreturns the Referral Params{"+clicked_branch_link":false,"+is_first_session":false}.- Open a different deep link with the app still running in the background.
BranchReferralInitListenerreturns either the same empty Referral Params, or the Referral Params of the previous Deep Link, but not the most recent one.
Expected behavior
Deep Links should work regardless of whether the app is running or not, and they should always return the most recent Referral Parameters through public InitSessionBuilder withCallback(BranchReferralInitListener callback).
SDK Version
5.8.2
Make and Model
Sony Xperia 1 IV, Google Pixel 6a
OS
14, 13
Additional Information/Context
Unfortunately, we are legally not able to leave user tracking enabled. And Branch.io is already deeply integrated with other products, so replacing it is not an option either.