O'Reilly logo

PhoneGap for Enterprise by Kerri Shotts

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Handling changes in the application state

Your app almost certainly won't be the only app running on the user's mobile device. As such, the app needs to properly handle being backgrounded and then later being resumed by the operating system. The app should also have a strategy in place to deal with unexpected terminations as the operating system (or the user) might terminate any app at will.

The pause event is fired when the app is being placed in the background by the user or by the operating system. The resume event is fired when the user or the operating system brings the app back to the foreground. Note that there is no guarantee that your app will receive a resume event after a pause event; the operating system might terminate the app instead. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required