Closed kwallis closed 12 years ago
cc @nukulb @tohman
Updated description to add the "batterylow" and "batterycritical" events. Note the example code originally had the event passed in as "batteryStatus", not "batterystatus". This has been changed as well
I believe the phonegap/cordova signature has a specific removeEventListener method. Are we intentionally choosing to remove by null?
Additionally the phonegap/cordova method has 3 parameters mapping to the three w3c parameters. We have no parameter for whether the event should useCapture. Is this intentional?
Lastly there is no reference as to whether we should track multiple listeners. I believe the phonegap/cordova method does support multiple listeners.
Update 2
Added support for multiple callbacks, and the removeEventListener method
There are no pps events for 'low' and 'critical' battery levels. We need to define what are battery levels when events for 'low' and 'critical' are fired.
First thing to find out is if the NDK has similar events, if it does we copy their percentage.
If they don't, which I suspect they don't, we can make two numbers up like 9 for low and 4 for critical. If we change it later, there is no User impact so I don't think its that big a deal
Where do I check the values NDK has?
Feature implemented by blackberry-webworks/BB10-Webworks-API#18
The developer should be able to know when the device is plugged in, unplugged, or when the battery level changes by a percentage point. Additional, the developer can be notified when the device enters a low or critical battery level state. This is based on registering to receive events. Registration should occur after the device ready event is fired.
Acceptance Criteria