I have this Activities sequence:
Avtivity01 => Avtivity02 => Avtivity03
You can go from Avtivity01 to Avtivity02 after you click a button.
You can go from Avtivity02 to Avtivity03 after you click a button.
–
I want to go from Activity03 to Activity01 DIRECTLY after I click a button.
–
NOTE:
I do NOT want to use Intent, because I want to have Activity01 as if I pressed the back button from Activity02
How to do that, please?
Why can’t you use an
Intent? You can use the FLAG_ACTIVITY_CLEAR_TOP when you click the button. Edit: If you want to preserve the original instance of theActivity, you can use this flag in conjunction with FLAG_ACTIVITY_SINGLE_TOP.Do you ever want to be able to press a button from Activity03 to go back to Activity02? If you ALWAYS want it to go back to Activity01, you could alternatively use
android:noHistory="true"on Activity02 in the manifest and just callfinish()on Activity03.