Lets suppose activities(A,B,C) are opened in following sequence:
A -> B -> A -> C-> A
Now in normal case the activity backstack will look
| A |
| C |
| A |
| B |
| A |
Is there any way I can make sure that Activity A resides in the backstack only once? Or in other words backstack look like:
| A |
| C |
| B |
EDIT : I want that new instance of activity is launched every time, and all previous instances are removed from stack. Is it even possible using built in schemes?
It sounds like you want to make use of the intent flag FLAG_ACTIVITY_REORDER_TO_FRONT