07-06-2012 08:00 AM - edited 07-06-2012 08:13 AM
I created a small test-app to get the battery-level and battery-status from the device. In My source-code, when calling the events, it seems to not work calling both successively, only the first of them seem to call the callback-function well after registering of the event:
some lines of source-code ... blackberry.system.event.deviceBatteryLevelChange(o
nBatteryLevelChange); blackberry.system.event.deviceBatteryStateChange(o nBatteryStateChange); ... some lines of source-code
In this example I get the battery-level immediately after calling the event registration, but the battery-status isn't quite coming that fast and needs to wait until the first event is fired. When changing the order of the event registration it appears to get me the battery-status back immediately and need to wait for the battery-level.