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

See also

QNXApplicationEvent



Public Properties

 PropertyDefined By
  qnxApplication : QNXApplication
[static] [read-only] Returns the Singleton instance of the QNXApplication class.
QNXApplication
  supportedFileTypes : Vector.<String>
Deprecated: The supportedFileTypes method can no longer reliably return all of the supported file types. Developers should use the InvokeManager.queryTargets() method instead.
[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
Deprecated: Developers should use the InvokeManager.invoke() method instead to open specific files.
Opens the given file in the default application for that file type.
QNXApplication

Events

 Event Summary Defined By
  Dispatches an event to the application 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 the user swipes down from the top of the device onto the screen.QNXApplication
  Dispatched when the user starts a swipe down from the top 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]
Deprecated: The supportedFileTypes method can no longer reliably return all of the supported file types. Developers should use the InvokeManager.queryTargets() method instead.

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
Deprecated: Developers should use the InvokeManager.invoke() method instead to open specific files.

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

Dispatches an event to the application when the device is running low on 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.

The QNXApplicationEvent.LOW_MEMORY constant defines the value of the type property of the event object for an lowMemory event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeQNXApplicationEvent.LOW_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.

The QNXApplicationEvent.OPEN_FILE_FAILURE constant defines the value of the type property of the event object for an openFileFailure event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeQNXApplicationEvent.OPEN_FILE_FAILURE

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.

The QNXApplicationEvent.OPEN_FILE_SUCCESS constant defines the value of the type property of the event object for an openFileSuccess event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeQNXApplicationEvent.OPEN_FILE_SUCCESS

swipeDown


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

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

NOTE: You cannot listen for this event and the QNXApplicationEvent.SWIPE_START event at the same time. You must choose one method or the other.

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

NOTE: You cannot listen for this event and the QNXApplicationEvent.SWIPE_START event at the same time. You must choose one method or the other.

This event can be used to provide an application 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"});
}
         

The QNXApplicationEvent.SWIPE_DOWN constant defines the value of the type property of the event object for an swipeDown event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeQNXApplicationEvent.SWIPE_DOWN

swipeStart


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

Dispatched when the user starts a swipe down from the top of the device onto the screen.

NOTE: You cannot listen for this event and the QNXApplicationEvent.SWIPE_DOWN event at the same time. You must choose one method or the other.

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

NOTE: You cannot listen for this event and the QNXApplicationEvent.SWIPE_DOWN event at the same time. You must choose one method or the other.

This event can be used to provide an application menu for your application. When the event is received applications can detect the mouse position allowing the menu to follow the users finger.

The QNXApplicationEvent.SWIPE_START constant defines the value of the type property of the event object for an swipeStart event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeQNXApplicationEvent.SWIPE_START

Constant Detail

CORPORATE


public static const CORPORATE:String = corp

ENTERPRISE


public static const ENTERPRISE:String = enterprise

PERSONAL


public static const PERSONAL:String = personal





comments powered by Disqus