Skip to content

Reopens Android app from recents trigger deeplink again #486

@Korpyc

Description

@Korpyc

Describe the bug

Hi, I’m facing an issue where opening the app via a deeplink triggers the expected handling, but when I background the app and return to it from recent apps, FlutterBranchSdk.listSession() emits the same deeplink again.

This occurs only with non-Branch links in the format:
scheme://some_link

iOS does not exhibit this behavior.

How can I prevent the deeplink from being re-emitted when the app is resumed from recents?

Steps to reproduce

Open the app using a non-Branch deeplink, in format:
scheme://some_link

Observe that the deeplink is handled correctly on app start.

Hide app to background the app (do not swipe it away).

Reopen the app from the recent apps screen.

Observe that FlutterBranchSdk.listSession() emits the same deeplink again, even though the app was not reopened via a deeplink.

A clear and concise description of what you expected to happen.

I expect to see generic state:

BranchReferralInitListener - params: {"+clicked_branch_link":false,"+is_first_session":false}

Plugin Version

8.10.0

Flutter Version

3.35.7

Android/iOS/Web

Android 16

Make and Model

OnePlus 13

Additional Information/Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageneeds-triage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions