Activity A -> Activity B -> Activity C -> Activity D
Let's assume we have this flow. From Activity D
I want to come back to Activity B
, so my stack should look after I close Activity D
like this:
Activity A -> Activity B
I have used startActivity(this, Activity B).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
but it does not restore the activity from back stack, it created it again;
When I initially start Activity B
from Activity A
I had sent some data in bundle which is lost now; So, do I have to sent that data through Activity C
-> Activity D
so I can have it and send it back to Activity B
when I open it form Activity D
, or I can some how restore Activity B
?