I have an Activity_1
after a lot of steps, say
Activity_2
> Activity_3
.... in some Activity_n
I change some data related to Activity_1
and call it using
Intent intent = new Intent(Activity_n.this, Activity_1.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
To refresh the content. But later I can go all the way back to Activity_1
where I started, which has old data.
Instead I want the initial Activity_1
' s onResume()
to be called, using the above code. Or appropriate Flag
FLAG_ACTIVITY_CLEAR_TOP
consider a task consisting of the activities: A, B, C, D. If D calls startActivity() with an Intent that resolves to the component of activity B, then C and D will be finished and B receive the given Intent, resulting in the stack now being: A, B.
That' what the docs say, but not what I am getting.