BranchMetrics / android-branch-deep-linking-attribution

The Branch Android SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://docs.branch.io/pages/apps/android/
MIT License
395 stars 155 forks source link

Branch SDK Deep Linking does not work when Tracking is disabled #1165

Closed SamanTheSquirrel closed 3 months ago

SamanTheSquirrel commented 5 months ago

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

  1. Set Branch.getInstance().disableTracking(true).
  2. Close the app.
  3. Open a deep link.
  4. BranchReferralInitListener returns the Referral Params {"+clicked_branch_link":false,"+is_first_session":false}.
  5. Open a different deep link with the app still running in the background.
  6. BranchReferralInitListener returns 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.

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale due to inactivity for 60 days. If this issue is still relevant, please respond with any updates or this issue will be closed in 7 days. If you believe this is a mistake, please comment to let us know. Thank you for your contributions.

github-actions[bot] commented 3 months ago

This issue has been closed due to inactivity. If this issue is still relevant, please reopen it or create a new one. Thank you for your contributions.