I am having trouble with my activity management. So I have activity A which goes to B and if you press the back button in B I want it to go to A, but there is also a case where B will finish and go to C and if I press the back button on C I want it to leave the app, basically the back stack is empty. What is the correct way to do this?
The only way I can see to do this is like this. When A starts B it calls finish() on A than on B I override the back button to start A, other wise if certain conditions are met call finish() on B and start C. Having to override the back button seems like I am doing something wrong.
Thanks for your help.