sudheer wrote:
> I have an application, which I want to exit by pressing an exit
> button.

Google's guidelines indicate that you are not supposed to do that. 
Android will take care of closing up your application when the user is 
done with it.

That being said...

> what all should I do in the exit button handling to make sure that my
> application cleans up and returns to the home screen?

Call finish() on your activity, and make sure that in onDestroy() you 
release all relevant resources (close cursors and databases, discontinue 
alarms, unregister BroadcastReceivers, etc.).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to