0
I’m trying to use the Cordova Batterystatus API and I’m not getting it, neither in the Intel XDK emulator, nor in the debug on my Android and when I get a .APK. It just doesn’t happen when I run.
Basically I’m using this code found in http://cordova.apache.org/docs/en/2.5.0/cordova_events_events.md.html#batterystatus:
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}