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 within the game. As shown in Chapter 6, an application can use the network connection awareness events to control when an application attempts to send or receive data with a remote server.

The chapter includes 5 complete applications that illustrate different aspects of the API.