01-05-2009 11:30 PM - edited 01-05-2009 11:41 PM
Try Application.deactivate() - this is called when the app is moved to background - not the same thing but might be useful.
01-06-2009 04:18 AM
Create your own functionality to clean up when the application is going to exit.
Do not call System.exit(0) directly in your application.
Implement a method that does all clean-up actions and invokes System.exit(0) after all.
And call only this method when you want to exit.