journey
The following
journey
properties are available and are described in more detail in the table below or in their corresponding subsections.Property | Description | Example |
---|---|---|
config | | |
container | | |
device | | |
diagnostics | | |
dialog | | |
env | Returns an object containing information about the deployment and backend that a user is currently enrolled in. Included fields:
Note: journey.env was introduced in version 4.85.6 of the JourneyApps Runtime. | { "url":"https://6351525394c500cc366d38e4.backend.us.journeyapps.com/", "appName":"Snag List", "region":"us", "testing":true, "deploymentName":"Snag List - Testing", "deploymentEnvironment":"testing","lastDeployedAt":"2022-11-20T14:47:36+00:00" } |
files | | |
hardware | | |
leaveApp | Programmatically forces the user leave the app. It has the same effect as the user manually leaving the app from the context menu. Note: journey.leaveApp was introduced in version 4.75.0 of the JourneyApps Runtime. | journey.leaveApp({keepData: true})
This forces the user to leave the app.
If the keepData parameter is set to true , application data
will remain on the device.
If set to false application data will be removed. |
locale | The code of the current language the user has selected. | var locale = journey.locale;
if (locale == 'en_US') {
dialog("Welcome, English (US) user");
} |
profiling | Can be used in the debug console to enable/disable more detailed performance profiling, such as logging all queries and digest cycles together with their duration. Note: journey.profiling was introduced in version 4.85.0 of the JourneyApps Runtime and is automatically enabled for debug builds of Desktop containers. | journey.profiling.enable() // Enables profiling. Use disable() to disable profiling again. |
runtime | | |
sensors | | |
server (Deprecated) | The URL of the JourneyApps Backend the user is enrolled in. Note: journey.server was deprecated in version 4.85.6 of the JourneyApps Runtime. Please use journey.env instead (see above). | https://run.journeyapps.com |
synchronize | Method to force the app to synchronize data to and from the JourneyApps backend. | |
theme | Method to get or set the current theme. Valid values include light (default) and dark .Note: journey.theme was introduced in version 4.37.0 of the JourneyApps Container. | var theme = journey.theme; // Gets the current theme
journey.theme = 'dark'; // Sets a new theme |
viewStack | |
Last modified 9mo ago