Class: Application

Application

An object representing an application. Allows the developer to create, execute, show/close an application as well as listen to application events.

Constructor

new Application()

Methods

close(forceopt) → {Promise.<boolean>}

Closes the application and any child windows created by the application.

Parameters:
Name Type Attributes Default Description
force boolean <optional>
false

Close will be prevented from closing when force is false and ‘close-requested’ has been subscribed to for application’s main window.

Tutorials:
Returns:
Type
Promise.<boolean>

getChildWindows() → {Promise.Array.<_Window>}

Retrieves an array of wrapped fin.Windows for each of the application’s child windows.

Tutorials:
Returns:
Type
Promise.Array.<_Window>

getGroups() → {Promise.Array.Array.<_Window>}

Retrieves an array of active window groups for all of the application's windows. Each group is represented as an array of wrapped fin.Windows.

Tutorials:
Returns:
Type
Promise.Array.Array.<_Window>

getInfo() → {Promise.<ApplicationInfo>}

Retrieves information about the application. message after a certain period of time.

Tutorials:
Returns:
Type
Promise.<ApplicationInfo>

getManifest() → {Promise.<any>}

Retrieves the JSON manifest that was used to create the application. Invokes the error callback if the application was not created from a manifest.

Tutorials:
Returns:
Type
Promise.<any>

getParentUuid() → {Promise.<string>}

Retrieves UUID of the application that launches this application. Invokes the error callback if the application was created from a manifest.

Tutorials:
Returns:
Type
Promise.<string>

getShortcuts() → {Promise.<ConfigInterface>}

Retrieves current application's shortcut configuration.

Tutorials:
Returns:
Type
Promise.<ConfigInterface>

getTrayIconInfo() → {Promise.<TrayInfo>}

Retrieves information about the system tray.

The only information currently returned is the position and dimensions.

Tutorials:
Returns:
Type
Promise.<TrayInfo>

getWindow() → {Promise.<_Window>}

Returns an instance of the main Window of the application

Tutorials:
Returns:
Type
Promise.<_Window>

isRunning() → {Promise.<boolean>}

Determines if the application is currently running.

Tutorials:
Returns:
Type
Promise.<boolean>

registerUser(userName, appName) → {Promise.<void>}

Manually registers a user with the licensing service. The only data sent by this call is userName and appName.

Parameters:
Name Type Description
userName string

username to be passed to the RVM.

appName string

app name to be passed to the RVM.

Tutorials:
Returns:
Type
Promise.<void>

removeTrayIcon() → {Promise.<void>}

Removes the application’s icon from the tray.

Tutorials:
Returns:
Type
Promise.<void>

restart() → {Promise.<void>}

Restarts the application.

Tutorials:
Returns:
Type
Promise.<void>

run() → {Promise.<void>}

Runs the application. When the application is created, run must be called.

Tutorials:
Returns:
Type
Promise.<void>

scheduleRestart() → {Promise.<void>}

Instructs the RVM to schedule one restart of the application.

Tutorials:
Returns:
Type
Promise.<void>

setShortcuts(config) → {Promise.<void>}

Sets new application's shortcut configuration.

Parameters:
Name Type Description
config Object

New application's shortcut configuration.

Properties
Name Type Attributes Description
desktop Boolean <optional>

Enable/disable desktop shortcut.

startMenu Boolean <optional>

Enable/disable start menu shortcut.

systemStartup Boolean <optional>

Enable/disable system startup shortcut.

Tutorials:
Returns:
Type
Promise.<void>

setTrayIcon(iconUrl) → {Promise.<void>}

Adds a customizable icon in the system tray and notifies the application when clicked.

Parameters:
Name Type Description
iconUrl string

Image URL to be used as the icon

Tutorials:
Returns:
Type
Promise.<void>

terminate() → {Promise.<void>}

Closes the application by terminating its process.

Tutorials:
Returns:
Type
Promise.<void>