To retrieve the battery information you must call the
The battery information retrieval is an asynchronous process so you must
listen for the
BatteryEvent.BATTERY_INFO event to get the response.
Then when the battery information is available:
BatteryEvent contains 2 pieces of information:
batteryLevel represents the current charge level of the battery. It ranges from
1 (full) to
batteryState indicates the current state of the battery and will be one of the values defined in the
class, which includes states like: full, charging, not charging.