How to update or reset an application in phonegap + jquery mobile?

I am developing an application in which the user needs to set some parameters on the settings page, and then the user moves the slider (which is located on the main page of the application), and the results are displayed on the main page. But after doing the calculation, when I press the home button of the iPhone simulator and open the application again. It displays the same settings and all. How do I update it or reset everything?

+6
source share
1 answer

You can associate an event handler with the pause or resume events that PhoneGap provides. The documentation can be found here: http://docs.phonegap.com/en/1.2.0/phonegap_events_events.md.html#Events

Summary

This is an event that fires when a PhoneGap application is received from the background.

 function onResume() { //run code to reset your app here } document.addEventListener("resume", onResume, false); 
+6
source

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