| Package | qnx.events |
| Class | public class DeviceBatteryEvent |
| Inheritance | DeviceBatteryEvent flash.events.Event |
DeviceBatteryEvent class provides battery level and state change event functionality.
See also
| Property | Defined By | ||
|---|---|---|---|
| batteryLevel : int [read-only]
Gets the battery level of the device ranging from 0 to 100. | DeviceBatteryEvent | ||
| batteryState : int [read-only]
Gets the battery state of the device. | DeviceBatteryEvent | ||
| Method | Defined By | ||
|---|---|---|---|
DeviceBatteryEvent(type:String, batteryState:int, batteryLevel:int)
The constructor for a DeviceBatteryEvent object. | DeviceBatteryEvent | ||
| Constant | Defined By | ||
|---|---|---|---|
| LEVEL_CHANGE : String = BatteryLevelChange [static]
Dispatched when a battery level change occurs. | DeviceBatteryEvent | ||
| STATE_CHANGE : String = BatteryStateChange [static]
Dispatched when a battery state change occurs. | DeviceBatteryEvent | ||
| batteryLevel | property |
batteryLevel:int [read-only] Gets the battery level of the device ranging from 0 to 100.
public function get batteryLevel():int| batteryState | property |
batteryState:int [read-only] Gets the battery state of the device.
public function get batteryState():intSee also
| DeviceBatteryEvent | () | Constructor |
public function DeviceBatteryEvent(type:String, batteryState:int, batteryLevel:int)
The constructor for a DeviceBatteryEvent object.
type:String — The type of the event.
| |
batteryState:int — The battery state.
| |
batteryLevel:int — The battery level.
|
| LEVEL_CHANGE | Constant |
public static const LEVEL_CHANGE:String = BatteryLevelChangeDispatched when a battery level change occurs.
| STATE_CHANGE | Constant |
public static const STATE_CHANGE:String = BatteryStateChangeDispatched when a battery state change occurs.