qnx.events.DeviceBatteryEvent

DeviceBatteryEvent

Properties | Methods | Constants


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

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

Class information:
BlackBerry 10 Version:   10.0.0
Found in:  QNXDevice.ane

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

batteryLevel


batteryLevel:int  [read-only]

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


Implementation

public function get batteryLevel():int

batteryState


batteryState:int  [read-only]

Gets the battery state of the device.


Implementation

public function get batteryState():int

See also

qnx.system.DeviceBatteryState

Constructor Detail

DeviceBatteryEvent()


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_CHANGE


public static const LEVEL_CHANGE:String = BatteryLevelChange

Dispatched when a battery level change occurs.

The DeviceBatteryEvent.LEVEL_CHANGE constant defines the value of the type property of the event object for an BatteryLevelChange event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
batteryLevelThe battery level at the time of the event.
batteryStateThe state of the battery at the time of the event.
typeDeviceBatteryEvent.LEVEL_CHANGE

STATE_CHANGE


public static const STATE_CHANGE:String = BatteryStateChange

Dispatched when a battery state change occurs.

The DeviceBatteryEvent.STATE_CHANGE constant defines the value of the type property of the event object for an BatteryStateChange event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
batteryLevelThe battery level at the time of the event.
batteryStateThe state of the battery at the time of the event.
typeDeviceBatteryEvent.STATE_CHANGE





comments powered by Disqus