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:
BlackBerry 10 Version:   10.0.0

See also

QNXSystemState
QNXSystemPowerMode
QNXSystemResource



Public Properties

 PropertyDefined By
  clipboardReadTime : Number
[read-only] Time in milliseconds at which the clipboard was last read based on the monotonic clock.
QNXSystem
  clipboardWriteTime : Number
[read-only] Time in milliseconds at which the clipboard was last written based on the monotonic clock.
QNXSystem
  inactivePowerMode : String
Gets or sets the power mode setting to switch to when the application becomes inactive.
QNXSystem
  maxTLSVersion : int
Maximum version of TLS to use for network requests that use https.
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
  timestampOffset : Number
[read-only] The difference between the monotonic clock and the timestamp used for event sources such as Accelerometer and Geolocation.
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
  
getEnvironmentVariable(name:String):String
Return the value of an environment variable.
QNXSystem
  
getResources():Object
Show the current resource requests.
QNXSystem
  
getTimestamp():Number
Returns the value of the monotonic system clock in milliseconds.
QNXSystem
  
hasClipboardContent(type:String, accessible:Boolean = true):Boolean
Return an indication if the clipboard contains content of a given type.
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
  
sendAccessibilityEvent(source:DisplayObject, eventType:uint, context:* = null):void
QNXSystem
  
setAlarm(duration:int, repeat:Boolean = false):int
Sets an alarm to cause activity during QNXSystemPowerMode.STANDBY power mode.
QNXSystem
  
setClipboardOptions(object:InteractiveObject, path:String):void
Sets the clipboard options to be be used when the indicated object has focus.
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

clipboardReadTime


clipboardReadTime:Number  [read-only]

Time in milliseconds at which the clipboard was last read based on the monotonic clock. If the clipboard has not been read since it was last written the time will be zero.


Implementation

public function get clipboardReadTime():Number

clipboardWriteTime


clipboardWriteTime:Number  [read-only]

Time in milliseconds at which the clipboard was last written based on the monotonic clock. If the clipboard has not been written the time will be zero.


Implementation

public function get clipboardWriteTime():Number

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

maxTLSVersion


maxTLSVersion:int

Maximum version of TLS to use for network requests that use https. Setting to TLSVersion.TLS_1_0 will allow operation with buggy servers that fail when the client requests higher versions. If set to TLS_ANY, the TLS version is unrestricted.


Implementation

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

See also

TLSVersion

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

timestampOffset


timestampOffset:Number  [read-only]

The difference between the monotonic clock and the timestamp used for event sources such as Accelerometer and Geolocation.


Implementation

public function get timestampOffset():Number

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

getEnvironmentVariable()


public function getEnvironmentVariable(name:String):String

Return the value of an environment variable.

Parameters

name:String — The name of the environment variable to fetch

Returns

String — The value of the environment variable or null if it was not set.

getResources()


public function getResources():Object

Show the current resource requests.

Returns

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

See also

QNXSystemResource

getTimestamp()


public function getTimestamp():Number

Returns the value of the monotonic system clock in milliseconds.

Returns

Number

hasClipboardContent()


public function hasClipboardContent(type:String, accessible:Boolean = true):Boolean

Return an indication if the clipboard contains content of a given type.

Parameters

type:String — Content to check for. This should be a standard mime type, for example text/plain.
accessible:Boolean (default = true) — If true, the function returns true if the content is present and also accessible. If false will return true even if the application does not have permission to read the content.

Returns

Boolean — true if the indicated content is present in the clipboard.

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).

sendAccessibilityEvent()


public function sendAccessibilityEvent(source:DisplayObject, eventType:uint, context:* = null):void

Parameters

source:DisplayObject
eventType:uint
context:* (default = null)

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.

setClipboardOptions()


public function setClipboardOptions(object:InteractiveObject, path:String):void

Sets the clipboard options to be be used when the indicated object has focus.

Parameters

object:InteractiveObject — The InteractiveObject the options are associated with. If this is a stage object then the options are used when the window associated with the stage becomes active, if there is no interactive object with focus or if it has not set its own options.
path:String — The clipboard path to use. If null, the default path is used.

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.




comments powered by Disqus