android-branch-deep-linking-attribution
android-branch-deep-linking-attribution copied to clipboard
Branch SDK Deep Linking retrieving old link data when app is opened from push notification
Describe the bug
We are experiencing an issue with the Branch SDK's link data processing in our app. Our implementation uses SessionBuilder along with BranchReferralInitListener for handling link data from SMS.
We Init a SessionBuilder in OnStart and OnNewIntent.
The initial processing of link data functions correctly. However, when the app is re-opened from a push notification after being backgrounded or closed, the SDK retrieves and processes outdated link data.
Steps to reproduce
- Open the app via a Branch link from SMS; initial link data is processed as expected.
- Background or close the app.
- Open the app from a push notification.
- Observe that the SDK retrieves and processes the old link data again.
The attached log.txt shows the SDk logs after the link has been processed and the app has re-opened from a notification.
We have a BranchReferralInitListener in OnStart and OnNewIntent. BranchSDK_Tester logs which listener is processing the link data.
When the app reopens via a push notification, the updated link data (with the variable set to true) is correctly ignored. However, the SDK subsequently processes the queue, resulting in a post request that retrieves the original link data (with the unupdated variable), leading to redundant processing.
Expected behavior
On re-opening the app I would expect to see:
Branch Networking Success URL: https://api2.branch.io/v1/open Response Code: 200 Response Message: OK Retry number: 0 requestId: * Object: y2.b@452ce0 Server returned: [*] Status: [200]; Data: {"data":"{"+clicked_branch_link":false,"+is_first_session":false}"
SDK Version
5.10.1
Make and Model
Google Pixel 6
OS
14
Additional Information/Context
- The issue has so far been replicated only on a Pixel 6 running Android 14.
@RichieBrady Could you open a support ticket for this? https://help.branch.io/using-branch/page/submit-a-ticket
The github issues page has much longer response times than support tickets.