Example
// After an arbitrary loading time tell SiteKiosk that the loading phase
// is complete and the app is ready to go
siteKiosk.apps.current.loading("We are waiting for our timeout to trigger...");
setTimeout(function () {
siteKiosk.apps.current.ready();
}, 10000);
-
<static> close()
-
Closes the app and removes it from the view hierarchy.
-
<static> deletePrivateData(deleteTempFiles, deleteHistory, completed)
-
Deletes private data related to the application.
Parameters:
Name |
Type |
Description |
deleteTempFiles |
boolean
|
Whether to delete cached files |
deleteHistory |
boolean
|
Whether to delete the browsing history |
completed |
siteKiosk.apps.current~deletePrivateDataCallback
|
Callback, which will be invoked when private data has been deleted |
-
<static> getConfig() → {string}
-
Gets the current apps configuration, which is typically an XML formatted string.
Returns:
The apps configuration
-
Type
-
string
-
<static> getConfig(callback)
-
Gets the current apps configuration, which is typically an JSON object.
Parameters:
Name |
Type |
Description |
callback |
siteKiosk.apps.current~backCallback
|
The callback, which will be triggered when the config has been loaded. |
-
<static> getGuid() → {string}
-
Gets the current apps GUID.
Returns:
The GUID
-
Type
-
string
-
<static> getGuid() → {string}
-
Gets the current apps app GUID.
Returns:
The app GUID
-
Type
-
string
-
<static> getId() → {number}
-
Gets the apps current instance id.
Returns:
App instance id
-
Type
-
number
-
<static> getId() → {string}
-
Gets the current apps ID.
Returns:
The app ID
-
Type
-
string
-
<static> getInstanceId() → {string}
-
Gets the current apps instance ID.
Returns:
The instance ID
-
Type
-
string
-
<static> getMode() → {string}
-
Gets the current apps mode e.g. "screensaver" or "app"
Returns:
The current mode
-
Type
-
string
-
<static> getNonImmersive() → {boolean}
-
Gets whether this app is not immersive.
Returns:
Whether this app is not immersive
-
Type
-
boolean
-
<static> getSettings() → {*}
-
Gets the settings object used to find configuration values.
Returns:
-
Type
-
*
-
<static> getStartMode() → {string}
-
Gets the current apps start mode (normal, logout, screensaver)
Returns:
The start mode.
-
Type
-
string
-
<static> hide()
-
Moves the app to the background (hidden).
-
<static> isActive() → {boolean}
-
Returns whether the current app is active (resumed) or not (paused).
Returns:
Whether the current app is active (resumed) or not (paused).
-
Type
-
boolean
-
<static> isForeground() → {boolean}
-
Returns whether the current app is in the foreground (showing) or not (hidden).
Returns:
whether the current app is in the foreground (showing) or not (hidden)
-
Type
-
boolean
-
<static> loading(text)
-
Tells SiteKiosk, that this app has not completed initialization.
When this method is called, SiteKiosk will display an overlay indicating
that this app is still loading, showing the message, if provided.
Parameters:
Name |
Type |
Argument |
Description |
text |
string
|
<optional>
|
Message to be displayed on the loading overlay |
-
-
Registers a callback which will be triggered when this application has received a back command,
because the back button has been pressed while the application was in foreground
Parameters:
Name |
Type |
Description |
callback |
siteKiosk.apps.current~backCallback
|
The callback, which will be triggered when this application has received a back command |
Returns:
An event subscription
-
Type
-
siteKiosk.apps.current~eventSubscription
-
-
Registers a callback, which will be called, when the application has been hidden.
Parameters:
Returns:
An event subscription
-
Type
-
siteKiosk.apps.current~eventSubscription
-
-
Registers a callback which will be called when the application received a home event.
Parameters:
Returns:
An event subscription
-
Type
-
siteKiosk.apps.current~eventSubscription
-
-
Registers a callback which will be called when the application has been paused.
Parameters:
Returns:
An event subscription
-
Type
-
siteKiosk.apps.current~eventSubscription
-
-
Registers a callback which will be called when the application has been resumed.
Parameters:
Returns:
An event subscription
-
Type
-
siteKiosk.apps.current~eventSubscription
-
-
Registers a callback which will be called when the application comes to foreground.
Parameters:
Returns:
An event subscription
-
Type
-
siteKiosk.apps.current~eventSubscription
-
<static> ready()
-
Tells SiteKiosk, that this app has completed initialization.
As long as this method is not called, SiteKiosk might display an overlay,
indicating that this app is still loading
-
<static> show()
-
Brings the app to foreground (showing).