0

I'm having the app with multiple screen My App Launch from splash(Launcher)->Home Screen->Child Screen. When User Tap on URL app directly jumps to Child Screen(Application need). But when user tap on URL a new instance of application launched which I don't want. I want to close the the existing app and launch the fresh app with Child Screen. Each activity is having android:launchMode="singleTop"

Mann
  • 560
  • 3
  • 13
Akshay
  • 6,029
  • 7
  • 40
  • 59

1 Answers1

-1

To launch the fresh Application I found this solution and its working fine for me

Intent intent = new Intent(Firstctivity.this, SecondActivity.class);
intent .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent );
finish();

It will close ongoing Task and create new one for me.. :)

Akshay
  • 6,029
  • 7
  • 40
  • 59