9. Events

The Cordova Events API exposes a specific set of events to a Cordova application developer. These events allow a Cordova application to respond to physical actions such as button presses as well as environmental activities such as battery life and network connection status. Applications register event listeners for specific events that occur on a supported smartphone devices and the Cordova core, or in some cases, specific plugins, notifies the application when the registered event occurs.

An application would use this API to add awareness of specific events to a Cordova application. A game application for example would use Button events to allow a user to use the physical buttons available on some smartphones to be used as action buttons ...

Get Apache Cordova API Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.