The PhoneGap Events API provides an application with the ability to register event listeners for different events that occur on a supported smartphone device. The following is a list of the types of events supported by PhoneGap:
• Application status events
• Network events
• Button events
The subsequent sections in this chapter will describe each of these event types in detail.
To create an event listener in a PhoneGap application, execute the following code:
document.addEventListener("eventName", functionName, useCapture);
The parameters passed to
addEventListener are as follows:
eventName: String value specifying the name of the event the listener will ...