Here is my case assuming that I have those activities A -> B -> C -> D
I want to come back to A when the user click on the back button when he is in D but also I want to come back to B when the user click on the back button of C
I thought to call finish when I go to C from B, but in this case I can't return to B if I click on back of C
how can I fix this issue without calling onBackPressed
on two activities?
thanks
When you start each activity, you will need to use
And then have a system of flags saying who is being stopped which are passed back. So, activity D:
And then in A, C, D