qnx.system.QNXSystem

QNXSystem

Properties | Methods | Events


Packageqnx.system
Classpublic class QNXSystem
InheritanceQNXSystem Inheritance flash.events.EventDispatcher

The QNXSystem class provides access to system-wide, system-specific functionality including power mode, system states, and system resources.

Class information:
PlayBook Tablet OS Version:   1.0.6

See also

QNXSystemState
QNXSystemPowerMode
QNXSystemResource



Public Properties

 PropertyDefined By
  inactivePowerMode : String
Gets or sets the power mode setting to switch to when the application becomes inactive.
QNXSystem
  powerMode : String
Gets or sets the current power mode setting.
QNXSystem
  system : QNXSystem
[static] [read-only] Returns the singleton QNXSystem object.
QNXSystem
  systemState : String
[read-only] Returns a String representing the current system state.
QNXSystem
  transitionTime : int
The duration (in milliseconds) of inactivity that must occur before the player switches out of normal power mode.
QNXSystem

Public Methods

 MethodDefined By
  
Use the static system property to return a QNXSystem instance.
QNXSystem
  
cancelAlarm(id:int):void
Cancels an alarm set by setAlarm().
QNXSystem
  
getResources():Object
Show the current resource requests.
QNXSystem
  
releaseResource(resource:String):void
Indicates that a resource is no longer required.
QNXSystem
  
requestResource(resource:String):void
Indicates that a resource is required.
QNXSystem
  
Run a single AIR frame cycle to allow timers from normal AIR timers and onEnterFrame handlers to be called.
QNXSystem
  
setAlarm(duration:int, repeat:Boolean = false):int
Sets an alarm to cause activity during QNXSystemPowerMode.STANDBY power mode.
QNXSystem

Events

 Event Summary Defined By
   Dispatched when the system goes into the active state.QNXSystem
   Dispatched when an alarm set by setAlarm expires.QNXSystem
  QNXSystem
   Dispatched when the system goes into the standby state.QNXSystem

Property Detail

inactivePowerMode


inactivePowerMode:String

Gets or sets the power mode setting to switch to when the application becomes inactive.


Implementation

public function get inactivePowerMode():String
public function set inactivePowerMode(value:String):void

See also

QNXSystemPowerMode

powerMode


powerMode:String

Gets or sets the current power mode setting.

One of:

  • QNXSystemPowerMode.NORMAL
  • QNXSystemPowerMode.STANDBY
  • QNXSystemPowerMode.THROTTLED


Implementation

public function get powerMode():String
public function set powerMode(value:String):void

See also

QNXSystemPowerMode

system


system:QNXSystem  [read-only]

Returns the singleton QNXSystem object.


Implementation

public static function get system():QNXSystem

systemState


systemState:String  [read-only]

Returns a String representing the current system state.

One of:

  • QNXSystemSystemState.ACTIVE
  • QNXSystemSystemState.INACTIVE
  • QNXSystemSystemState.STANDBY


Implementation

public function get systemState():String

See also

QNXSystemState

transitionTime


transitionTime:int

The duration (in milliseconds) of inactivity that must occur before the player switches out of normal power mode.

For example, if the power mode is set to QNXSystemPowerMode.STANDBY, the mode will remain in normal power mode until no window updates occur for this period of time.


Implementation

public function get transitionTime():int
public function set transitionTime(value:int):void

Constructor Detail

QNXSystem()


public function QNXSystem()

Use the static system property to return a QNXSystem instance.

See also

system

Method Detail

cancelAlarm()


public function cancelAlarm(id:int):void

Cancels an alarm set by setAlarm().

Parameters

id:int — The ID of teh alarm to cancel

getResources()


public function getResources():Object

Show the current resource requests.

Returns

Object — An object with a property for each requested resource.

See also

QNXSystemResource

releaseResource()


public function releaseResource(resource:String):void

Indicates that a resource is no longer required. Resource names that are known by the runtime are provided by the class QNXSystemResource.

Parameters

resource:String — The name of the resource to release.

See also

QNXSystemResource

requestResource()


public function requestResource(resource:String):void

Indicates that a resource is required. Resource names that are known by the runtime are provided by the class QNXSystemResource.

Parameters

resource:String — The name of the resource.

See also

QNXSystemResource

runFrameCycle()


public function runFrameCycle():void

Run a single AIR frame cycle to allow timers from normal AIR timers and onEnterFrame handlers to be called. This is only useful in standby power mode (QNXSystemPowerMode.STANDBY).

setAlarm()


public function setAlarm(duration:int, repeat:Boolean = false):int

Sets an alarm to cause activity during QNXSystemPowerMode.STANDBY power mode.

Parameters

duration:int — Duration of the alarm (in milliseconds).
repeat:Boolean (default = false) — If true, the alarm is periodic. Otherwise the alarm occurs only once.

Returns

int — The alarm ID. You can use the ID to cancel the alarm, by passing it into the cancelAlarm() function.

Event Detail

active


Event Object Type: qnx.events.QNXSystemEvent
QNXSystemEvent.type property = qnx.events.QNXSystemEvent.ACTIVE

Dispatched when the system goes into the active state.

alarm


Event Object Type: qnx.events.QNXSystemEvent
QNXSystemEvent.type property = qnx.events.QNXSystemEvent.ALARM

Dispatched when an alarm set by setAlarm expires.

inactive


Event Object Type: qnx.events.QNXSystemEvent
QNXSystemEvent.type property = qnx.events.QNXSystemEvent.INACTIVE

standby


Event Object Type: qnx.events.QNXSystemEvent
QNXSystemEvent.type property = qnx.events.QNXSystemEvent.STANDBY

Dispatched when the system goes into the standby state.