Module: siteKiosk.system.apps

This module provides means to enumerate and find apps that are installed on the system and to start them. Note that parameters needed are different for different operating systems. This module is similar to the 'general' App module (see here). Also note that the functions return SystemAppManifest Objects rather than SystemApp Objects.

Classes

SystemApp
SystemAppManifest

Methods

<static> canOpen(path, mimeType) → {boolean}

Checks if there is a suitable system application available to open a file. If you do not specify a MIME type, it will be determined by the file extension.
Parameters:
Name Type Argument Description
path string A file system path to the file
mimeType string <optional>
The MIME type of the file
Returns:
Whether a suitable applications has been found
Type
boolean

<static> closeAll()

Closes all launched system applications.

<static> findByDisplayName(mode) → {Array.<siteKiosk.system.apps~SystemAppManifest>}

Filters apps by their display name.
Parameters:
Name Type Description
mode string The apps display name
Returns:
An array containing all app manifests with the specified display name
Type
Array.<siteKiosk.system.apps~SystemAppManifest>

<static> getAll() → {Array.<siteKiosk.system.apps~SystemAppManifest>}

Gets all system applications.
Returns:
An array containing all app manifests
Type
Array.<siteKiosk.system.apps~SystemAppManifest>

<static> getByGuid(id) → {siteKiosk.system.apps~SystemAppManifest}

Get the app with the specified ID. The ID may have a different format on each system. On Android it is the package name, on Windows this will be the path to the executable.
Parameters:
Name Type Description
id String The applications id
Returns:
An app object
Type
siteKiosk.system.apps~SystemAppManifest

<static> openFile(path, mimeType)

Opens a file by path and optional MIME type using an allowed system application. If you do not specify a MIME type, it will be determined by the file extension.
Parameters:
Name Type Argument Description
path string A file system path to the file
mimeType string <optional>
The MIME type of the file