I am having trouble finding out how to maintain the state of my Android app in development.
Just to clarify, I am not talking about maintaining activity state (i.e. keeping track of textbox values, checkboxes, etc on a specific activity).
Let's say for example my application has two activities A
and B
. When I start my app, it takes me to activity A
, and pressing a button on it takes me to activity B
. At this point, I press the home button on my phone to return to the main Android UI and exiting my app . However, if I choose to run my app again, it should take me to activity B
, which is where I left off before pressing the home button, but instead it is taking me to activity A
.
Does anyone know how I can rectify this?
(I am using a Samsung Vibrant in case if you need to know)