android-branch-deep-linking-attribution
android-branch-deep-linking-attribution copied to clipboard
Branch IO deep link always opens splash activity
I have integrated BranchIO in splash activity(i.e. The Launcher Activity).
case 1: When the app is not in the background and I click on the deep link, SplashActivity is opened. (Works fine)
case 2: When I am already logged in and put the app in the background, on click on the deep link the app again restarts with Splash Activity
I want the app to be resumed in whichever state it was left when I click on the deep link. How to achieve this?
One solution would be to handle navigation in SplashActivity whenever the app is opened via a link, but that is not feasible here. We just want to launch the app in whichever state it was left before
Hello @Abhishek284,
Have you set the launch mode to SingleTask for your splash activity?
Hey @Abhishek284,
Could you provide us with steps to reproduce while also confirming our integration instructions?
From my observation, the branch links opens only launcher activity.(No matter whether the app is in background or not). If user have navigated to some different activity within app and puts the app is background, and then clicks on a deeplink from email or messages, the app restarts with launcher activity. I think this is a limitation.
I have faced the same issue when I put the logic into Splash/Launcher activity. It was always opening the app from Launcher Activity. From fresh launch or bringing the app from background to foreground when I click the deeplink.
I had to move my logic to MainActivity to solve this issue.