journey
Last updated
Last updated
The following journey
properties are available and are described in more detail in the table below or in their corresponding subsections.
config
See the subsection.
container
See the subsection.
device
See the subsection.
diagnostics
See the subsection.
dialog
See the subsection.
env
Returns an object containing information about the deployment and backend that a user is currently enrolled in. Included fields:
appName
: The name of the app.
url
: The URL of the JourneyApps Backend.
region
(au
| eu
| us
): The region code of the user's deployment.
deploymentName
: The name of the user's deployment.
deploymentEnvironment
(testing
| staging
| production
): The environment of the user's deployment.
testing
(true
| false
): Flag indicating that the user is enrolled in a testing
deployment.
lastDeployedAt
: Timestamp of the last deploy to the user's deployment.
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
See the subsection.
hardware
See the subsection
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 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
See the subsection.
sensors
See the subsection.
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
See the subsection.