Multi-tasking capabilities that are now available on mobile devices specify that the user has the ability to switch from one application to another at any time. We need to handle this possibility and ensure that we can save and restore any process and data when the user returns to our application.
We can use the PhoneGap API to detect when our application is brought back to the foreground of the device:
resumedemoby running the following command:
phonegap create resumedemo com.myapp.resumedemo resumedemo
cordova platform add ios cordova platform add android
www/index.htmland let's clean ...