Working with a mobile application using jQuery mobile and phonegap framework. My question is pretty simple - how would you click on closing applications. Scenario. When the user clicks the close button of the application, if the application is in the middle of some processing, I would like to do some cleaning operation - for example, write some status codes to a file. My application cannot complete clean exit. Is there an event to close the application that we could use either in phonegap or in jQuery?
I could see links to how to exit the application, but nothing clicks on the event that is fired when someone closes the application.
Currently working on a blackberry application using phonegap / jquery mobile.
EDIT
For blackberry we could use
blackberry.system.event.onHardwareKey(blackberry.system.event.KEY_BACK, function() { alert('back button pressed'); });
However, I'm not sure what to use the application to close the application after processing the event on all Blackberry phones.
navigator.app.exitApp() or device.exitApp()
source share