qnx.fuse.ui.utils.IdleDetector

IdleDetector

Properties | Methods | Events


Packageqnx.fuse.ui.utils
Classpublic class IdleDetector
InheritanceIdleDetector Inheritance flash.events.EventDispatcher

The IdleDetector class provides coarse user idle or user presense detection (second granularity).

On BB10, user idle detection will not occur before 5 seconds of the last user event, and user presence detection will not occur before 500 ms of a new user event (and after the user was seen to be idle).



Class information:
BlackBerry 10 Version:   10.0.0

See also

userIdle
userPresent



Public Properties

 PropertyDefined By
  idleThreshold : int
The number of seconds that must elapse without user input before a userIdle event is dispatched.
IdleDetector
  isUserIdle : Boolean
[read-only] Whether the user is currently idle or not.
IdleDetector
  timeSinceLastUserInput : int
[read-only] The time, in seconds, since the last user input.
IdleDetector

Public Methods

 MethodDefined By
  
IdleDetector(target:IEventDispatcher = null)
Creates a new instance of the IdleDetector class, which provides coarse user idle or user presense detection.
IdleDetector
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[override]
IdleDetector
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[override]
IdleDetector

Events

 Event Summary Defined By
  Dispatched when the operating system detects the user is currently idle.IdleDetector
  Dispatched when the operating system detects user activity after an idle period.IdleDetector

Property Detail

idleThreshold


idleThreshold:int

The number of seconds that must elapse without user input before a userIdle event is dispatched.

By default, the idle threshold is 10 seconds. The acceptable range of values is from 5 (5 seconds) through 86,400 (1 day), inclusive.


Implementation

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

Throws
ArgumentError — If you attempt to set the property to an invalid value. The acceptable range of values is from 5 (5 seconds) through 86,400 (1 day), inclusive.

See also

userIdle
userPresent

isUserIdle


isUserIdle:Boolean  [read-only]

Whether the user is currently idle or not.


Implementation

public function get isUserIdle():Boolean

See also

idleThreshold

timeSinceLastUserInput


timeSinceLastUserInput:int  [read-only]

The time, in seconds, since the last user input.


Implementation

public function get timeSinceLastUserInput():int

See also

userIdle
userPresent

Constructor Detail

IdleDetector()


public function IdleDetector(target:IEventDispatcher = null)

Creates a new instance of the IdleDetector class, which provides coarse user idle or user presense detection.

On BB10, user idle detection will not occur before 5 seconds of the last user event, and user presence detection will not occur before 500 ms of a new user event (and after the user was seen to be idle).

Parameters

target:IEventDispatcher (default = null)

See also

userIdle
userPresent

Method Detail

addEventListener()


override public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

Parameters

type:String
listener:Function
useCapture:Boolean (default = false)
priority:int (default = 0)
useWeakReference:Boolean (default = false)

removeEventListener()


override public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Parameters

type:String
listener:Function
useCapture:Boolean (default = false)

Event Detail

AIR-only userIdle


Event Object Type: flash.events.Event
Event.type property = flash.events.Event.USER_IDLE

Runtime Versions : AIR 1.0

Dispatched when the operating system detects the user is currently idle.

Specify the period of time for which a user must be idle before this event is dispatched using the idleThreshold property. The amount of time that the user has been idle can be determined from the timeSinceLastUserInput property.

See also

idleThreshold
timeSinceLastUserInput

userPresent


Event Object Type: flash.events.Event
Event.type property = flash.events.Event.USER_PRESENT

Dispatched when the operating system detects user activity after an idle period.

The period of time that is considered idle is configurable with the idleThreshold property. The amount of time that the user has been idle can be determined from the timeSinceLastUserInput property.

See also

idleThreshold
timeSinceLastUserInput





comments powered by Disqus