0

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 link, but that is not feasible here. We just want to launch the app in whichever state it was left before.

abhishek maharajpet
  • 482
  • 1
  • 4
  • 18

1 Answers1

0

In splash screen's onCreate check that splash screen is root activity or not. if it root task then finish. because your app is already opened.

if(isTaskRoot()){
   finish()
}
KuLdip PaTel
  • 1,069
  • 7
  • 19