Maintaining application state in Android
<p>I am having trouble finding out how to maintain the state of my Android app in development.</p>

<p>Just to clarify, I am not talking about maintaining activity state (i.e. keeping track of textbox values, checkboxes, etc on a specific activity). </p>

<p>Let's say for example my application has two activities <code>A</code> and <code>B</code>. When I start my app, it takes me to activity <code>A</code>, and pressing a button on it takes me to activity <code>B</code>. 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 <code>B</code>, which is where I left off before pressing the home button, but instead it is taking me to activity <code>A</code>. </p>

<p>Does anyone know how I can rectify this? </p>

<p>(I am using a Samsung Vibrant in case if you need to know)</p>
