| Package | qnx.system |
| Class | public class QNXApplication |
| Inheritance | QNXApplication flash.events.EventDispatcher |
QNXApplication class contains application and system information, system-wide functions, and dispatches system events.
See also
| Property | Defined 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 | ||
| Method | Defined 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 | ||
| 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 | |||
| qnxApplication | property |
qnxApplication:QNXApplication [read-only] Returns the Singleton instance of the QNXApplication class.
public static function get qnxApplication():QNXApplication| supportedFileTypes | property |
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.
public static function get supportedFileTypes():Vector.<String>See also
| 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.
enforcer:SingletonEnforcer — Used to prevent direct construction of this class.
|
See also
| openFile | () | method |
public function openFile(filePath:String):voidOpens 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
| lowMemory | Event |
qnx.events.QNXApplicationEventqnx.events.QNXApplicationEvent.LOW_MEMORYDispatched 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 |
qnx.events.QNXApplicationEventqnx.events.QNXApplicationEvent.SWIPE_DOWNDispatched 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"});
}