ANDROID :How to start an existing activity as new activity from stack
-
14-11-2019 - |
Question
I am using ActivityGroup in my application. I am starting each activity by :
Window objWindow = getLocalActivityManager().startActivity(argActivityId,argIntent);
View objView = objWindow.getDecorView();
setContentView(objView);
But when I am trying to start an activity, that is already started by another activity, it will not start as a new activity, instead the old activity object is retained.
How can I start this as a new activity?
Thanking you...
Solution
Set the FLAG_ACTIVITY_CLEAR_TOP intent flag of argIntent before calling startActivity.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow