state of activity saving in android when home button pressed
<p>I am having an issue related to home key . when i press home key all current activity gets hidden . but when i press the executable it again starts from the fisrt screen . I have overidden all methods onsaveInstaceState     opPause    onStop    onResume
but there are still issues what is the right way to handle those conditions .
When i am pressing home button i am storing the widgets state in database and  when i again click the exectable i am checking the database state and starting the new Intent as saved when user presses the home button .Is it the right way to do that as i am facing the problem when user does the same and again presses the back  button , there is already on intent available in stack of activity .
     Thanks in advance.</p>
