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"
Asked
Active
Viewed 72 times
0
1 Answers
-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