qnx.system.QNXApplication

QNXApplication

Properties | Methods | Events | Constants


Packageqnx.system
Classpublic class QNXApplication
InheritanceQNXApplication Inheritance flash.events.EventDispatcher

The QNXApplication class contains application and system information, system-wide functions, and dispatches system events.

Class information:
PlayBook Tablet OS Version:   1.0.6

See also

QNXApplicationEvent



Public Properties

 PropertyDefined By
  qnxApplication : QNXApplication
[static] [read-only] Returns the Singleton instance of the QNXApplication class.
QNXApplication
  supportedFileTypes : Vector.<String>
[static] [read-only] A Vector array (a typed array of String values) of file extensions which can be opened in the default application on the device.
QNXApplication

Public Methods

 MethodDefined By
  
QNXApplication(enforcer:SingletonEnforcer)
The constructor of the QNXApplication class.
QNXApplication
  
openFile(filePath:String, perimeter:String):void
Opens the given file in the default application for that file type.
QNXApplication

Events

 Event Summary Defined By
   Dispatched when the device is running low on memory.QNXApplication
   Dispatched when a file has failed to opened by calling the QNXApplication.openFile() method.QNXApplication
   Dispatched when a file has successfully opened by calling the QNXApplication.openFile() method.QNXApplication
   Dispatched when a user swipes down from the top bezel of the device onto the screen.QNXApplication

Public Constants

 ConstantDefined By
  CORPORATE : String = corp
[static]
QNXApplication
  ENTERPRISE : String = enterprise
[static]
QNXApplication
  PERSONAL : String = personal
[static]
QNXApplication

Property Detail

qnxApplication


qnxApplication:QNXApplication  [read-only]

Returns the Singleton instance of the QNXApplication class.


Implementation

public static function get qnxApplication():QNXApplication

supportedFileTypes


supportedFileTypes:Vector.<String>  [read-only]

A Vector array (a typed array of String values) of file extensions which can be opened in the default application on the device.


Implementation

public static function get supportedFileTypes():Vector.<String>

See also

openFile()

Constructor Detail

QNXApplication()


public function QNXApplication(enforcer:SingletonEnforcer)

The constructor of the QNXApplication class. This should never be called directly. Use the QNXApplication.qnxApplication property to create an instance.

Parameters

enforcer:SingletonEnforcer — Used to prevent direct construction of this class.

See also

qnxApplication

Method Detail

openFile()


public function openFile(filePath:String, perimeter:String):void

Opens the given file in the default application for that file type.

If the file type is not known by the device, the file is not opened. Before attempting to open a file, check the QNXApplication.supportedFileTypes Vector array to see if the file is a valid file extension.

Parameters

filePath:String — The path to the file on the device.
perimeter:String — The perimeter to launch the application in (priviledged ability).

See also

supportedFileTypes

Event Detail

lowMemory


Event Object Type: qnx.events.QNXApplicationEvent
QNXApplicationEvent.type property = qnx.events.QNXApplicationEvent.LOW_MEMORY

Dispatched when the device is running low on memory. When this event is received you should save the state and free as many resources as possible. When the device is running low on memory, it will begin terminating applications in order to free up more memory.

openFileFailure


Event Object Type: qnx.events.QNXApplicationEvent
QNXApplicationEvent.type property = qnx.events.QNXApplicationEvent.OPEN_FILE_FAILURE

Dispatched when a file has failed to opened by calling the QNXApplication.openFile() method.

openFileSuccess


Event Object Type: qnx.events.QNXApplicationEvent
QNXApplicationEvent.type property = qnx.events.QNXApplicationEvent.OPEN_FILE_SUCCESS

Dispatched when a file has successfully opened by calling the QNXApplication.openFile() method.

swipeDown


Event Object Type: qnx.events.QNXApplicationEvent
QNXApplicationEvent.type property = qnx.events.QNXApplicationEvent.SWIPE_DOWN

Dispatched when a user swipes down from the top bezel of the device onto the screen.

This event can be used to provide a context menu for your application. The following listing shows a simple drop-down menu that renders when the user swipes down from the top bezel of the device:

        QNXApplication.qnxApplication.addEventListener(QNXApplicationEvent.SWIPE_DOWN, showAppMenu);
        
        private function showAppMenu(event:QNXApplicationEvent):void
        {
            if(! _menu.isVisible())
            {
                _menu.show();
            }
        }
        
        public function show():void
        {
            _active = true;
            Tweener.addTween(this, {y:VISIBLE_Y, time:SLIDE_TIME, transition:"linear"});
        }
        

Constant Detail

CORPORATE


public static const CORPORATE:String = corp

ENTERPRISE


public static const ENTERPRISE:String = enterprise

PERSONAL


public static const PERSONAL:String = personal