Cordova provides a set of various events for your application. These events are fired by the application, if required. We know that sometimes, we often need to determine when our application enters the device background and when it comes back into the foreground. So, for such tasks, we have event listeners.
Here, we define an application code that can add the event listeners.
The following table lists the cordova events and the supported platforms:
This event is fired when the Cordova application is fully loaded. It is an essential event for any of the applications. We need to use this event for getting the information about the device APIs that if they have loaded and are ready to access.
Once this event gets fired, we can make calls safely to the Cordova APIs.
This event gets fired when a native platform is used to run the application into the background. It mainly occurs when a user switched to the other application
This event gets fired only when a native platform leaves the application from the background.
When a user clicked on the back button, this event is fired. Register an event listener for backbutton event, if you want to override the behaviour of default back-button.
When a user clicked on the menu button, this event is fired. To overrides the behaviour of default menu button, need to apply an event handler.
On Android platform, this event is fired only when a user clicked on the search button. We need to register an event listener for this event to override the behaviour of default search button.
When a user clicks on the start call button, then this event is fired. We need to register an event listener for this particular event to override the behavior of default start call.
When a user clicks on the end call button, this event is fired. To override the behavior of default end call, we can use this event.
When a user clicks on the volume down button, this event is fired. We need to register an event listener for this particular event to override the behavior of default volume down.
When a user clicks on the volume up button, this event is fired. We need to register an event listener for this particular event to override the behavior of the default volume up.
This event is fired only when it occur the Windows Runtime activation.