Close/reset application on Home button click

Put your problem here if it does not fit any of the other categories.

Close/reset application on Home button click

Postby Firipu » Sun Jul 04, 2010 11:40 am


I'm using an HTC Desire and I'm making an app for it at the moment..

But I have run into some problems. I want to reset my application every time I start it.

At the moment, when I enter the information in my application, it saves this. So when I decide to leave it using the home button and then I start it up again/reload it by clicking the application on the home screen, it just shows the saved status. So it shows the information I entered before.

But I want my application to show my standard "enter information here" message every time I start the application from the home screen.
I do want to save its state when the phone goes in sleep mode though (by pushing the powerbutton for instance).

So is it possible to either force the application to really close/not save its state when I push the home button?
Or to get the application to reset itself to the original state whenever I launch it from the home screen?

I hope it's somewhat clear?

Thanks in advance,

Once Poster
Once Poster
Posts: 1
Joined: Sun Jul 04, 2010 11:05 am


Re: Close/reset application on Home button click

Postby blundell » Sun Jul 04, 2010 12:32 pm

lifecycle_of_an_activity-t81.html < Find what state your app is in when HOME is pressed here
User avatar
Master Developer
Master Developer
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK


Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 5 guests