Deviceready:
When Cordova is fully loaded, you can call the Cordova API interface support platform: Amazon, Fire OS, Android, BlackBerry 10, IOS, Tizen, Windows Phone 8, Windows 8
Pause:The app switches to events that are monitored during the background runtime, such as opening other apps. Supported platforms: Amazon fire OS, Android, BlackBerry 10, IOS, Windows Phone 8, Windows 8
Resume:The app re-acquires the listening event support platform from the background: Amazon fire OS, Android, BlackBerry 10, IOS, Windows Phone 8, Windows 8ios when the app switches to the foreground, The function executed by the resume event is wrapped in settimeout (fn,0), otherwise the app will be suspended.
Backbutton:Event support platform for listening when you press the phone back button: Amazon fire OS, Android, BlackBerry 10, Windows phone 8
Menubutton:Event support platform that listens when you press the menu button on your phone: Amazon fire OS, Android, BlackBerry 10
SearchButton:Event support platform for listening when you press the search button on your phone: Android
Startcallbutton:Event support platform for listening when dialing button is pressed: BlackBerry 10
Endcallbutton:Event support platform for listening when you press the end call key: BlackBerry 10
Volumedownbutton:Monitor volume down event support platform: BlackBerry 10, Android
Volumeupbutton:Monitoring volume plus key event support platform: BlackBerry 10, Android code example:
[HTML]View PlainCopy
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
- <html>
- <head>
- <title>Volume Up Button Example</title>
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
- <script type="text/javascript" charset="utf-8">
-
- // Wait for device API libraries to load
- //
- function onLoad() {
- document.addEventListener("deviceready", onDeviceReady, false);
- }
-
- // device APIs are available
- //
- function onDeviceReady() {
- // Register the event listener
- document.addEventListener("volumeupbutton", onVolumeUpKeyDown, false);
- }
-
- // Handle the volume up button
- //
- function onVolumeUpKeyDown() {
- }
-
- </script>
- </head>
- <body onload="onLoad()">
- </body>
- </html>
Cordova: Event Events