Search code examples
androidandroid-activityback-stack

Get activity from Back Stack keeping history, instead of creating new one


I'm trying to do something like this:

I have some activities in task:

A->B->C

and from C i want to call instance of B from stack and keep current history. So the wondered result looks like this:

A->B->C->B

where B and B is the same instances, but with possibility to navigate back with Back button.

Is it possible?

May be duped: Android task history stack: can have "duplicate activities"?


Solution

  • I solved my problem by realising my own Back Stack. Main idea was to use FLAG_ACTIVITY_BRING_TO_TOP for indicating my singleton acivities.