Packageqnx.events
Classpublic class DeviceBatteryEvent
InheritanceDeviceBatteryEvent Inheritance flash.events.Event

The DeviceBatteryEvent class provides battery level and state change event functionality.

See also

qnx.system.Device


Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined By
  
DeviceBatteryEvent(type:String, batteryState:int, batteryLevel:int)
The constructor for a DeviceBatteryEvent object.
DeviceBatteryEvent
Public Constants
 ConstantDefined 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
Property Detail
batteryLevelproperty
batteryLevel:int  [read-only]

Gets the battery level of the device ranging from 0 to 100.


Implementation
    public function get batteryLevel():int
batteryStateproperty 
batteryState:int  [read-only]

Gets the battery state of the device.


Implementation
    public function get batteryState():int

See also

Constructor Detail
DeviceBatteryEvent()Constructor
public function DeviceBatteryEvent(type:String, batteryState:int, batteryLevel:int)

The constructor for a DeviceBatteryEvent object.

Parameters
type:String — The type of the event.
 
batteryState:int — The battery state.
 
batteryLevel:int — The battery level.
Constant Detail
LEVEL_CHANGEConstant
public static const LEVEL_CHANGE:String = BatteryLevelChange

Dispatched when a battery level change occurs.

STATE_CHANGEConstant 
public static const STATE_CHANGE:String = BatteryStateChange

Dispatched when a battery state change occurs.