Closing the phonegap jquery mobile mobile app

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() 
+4
source share
1 answer

See phonegap api -> events -> pause:

 http://docs.phonegap.com/en/1.2.0/phonegap_events_events.md.html#pause 
+1
source

Source: https://habr.com/ru/post/1381518/


All Articles