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.

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):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 user swipes down from the top bezel of the device onto the screen.QNXApplication
Property Detail
qnxApplicationproperty
qnxApplication:QNXApplication  [read-only]

Returns the Singleton instance of the QNXApplication class.


Implementation
    public static function get qnxApplication():QNXApplication
supportedFileTypesproperty 
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

Constructor Detail
QNXApplication()Constructor
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

Method Detail
openFile()method
public function openFile(filePath: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.

See also

Event Detail
lowMemory Event
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.
swipeDown Event  
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"});
        }