Technical Guide
Configuration key-value pairs applicable to custom intents.
Device Events
The following device states/events are available as triggers in the launcher.json's base-level object "intents"
. Multiple intent objects can be listed sequentially in each device event's array.
preLogin
array A collection of Custom Intents to invoke before the authentication process begins.
login
array A collection of Custom Intents to invoke after user logs into the device.
logout
array A collection of Custom Intents to invoke after user logs out of the device, prior to launcher completing full logout.
postLogout
array A collection of Custom Intents to invoke after user logs out of the device. This occurs after all Logout actions are completed.
boot
array A collection of Custom Intents to invoke after device boot.
uncradle
array A collection of Custom Intents to invoke after the device is removed from the cradle.
cradle
array A collection of Custom Intents to invoke after the device is placed on the cradle.
screenOn
array A collection of Custom Intents to invoke after the screen turns on.
motionLockEnter
array A collection of custom intents to invoke when lockInMotion engages on the device.
motionLockExit
array A collection of custom intents to invoke when the device exits from lockInMotion state.
siteChange
array A collection of custom intents to invoke when a site change is detected.
Key-Value Pairs
The following key-value pairs are used to build each custom intent object:
package
string The package to invoke.
action
string Android action, or special Platform Action.
category
string Android Category.
class
string The Class name within the package.
flags
integer Flags to use during firing the intent. Currently supports the value of 1, which indicates new task.
typeIntent
string The type of intent, values b, i, a, d or p. b = Broadcast (default), i = implicit intent, a = start Activity, d = delay, p = platform.
extras
Hash Map Key/value pairs of additional data to send. Example:
data
string Data to send with the intent.
filter
object Object for defining which key-value pair of the session object will trigger the intent. Example:
Examples
All Device Event Arrays
Below is an example where each device event array is present. The following example performs the following:
After login, the Launcher home screen will rotate to Landscape orientation
During logout:
Launcher clears the cache of Android Chrome
The Launcher home screen will rotate back to Portrait orientation
In addition, whenever the device is removed from the cradle:
The device volume will be adjusted to 100%
Unused arrays may or may not be included in the "intents" object for the existing intents to work; empty arrays do not cause issues but they are also not required to be included.
Dynamic Time Zones
This specific intent example is a potential solution to the problem of automatically assigning time zones to devices, especially in non-uniform time zones such the US state of Arizona. The following example requires adding a siteTimeZone column to the sitelist.csv file deployed to devices, which creates a custom extended attribute named siteTimeZone. The intents also trigger StageNow XMLs via Launcher's XML platform action, so this example is only applicable to Zebra devices.
The example below performs the following:
When the device's site changes because the device is in a new location
If the device's current site is associated in the sitelist.csv file with the extended attribute
"siteTimeZone": "Eastern"
, then a StageNow XML to set the device to Eastern time will be triggered.If the device's current site is associated in the sitelist.csv file with the extended attribute
"siteTimeZone": "Central"
, then a StageNow XML to set the device to Central time will be triggered.If the device's current site is associated in the sitelist.csv file with the extended attribute
"siteTimeZone": "Mountain"
, then a StageNow XML to set the device to Mountain time will be triggered.If the device's current site is associated in the sitelist.csv file with the extended attribute
"siteTimeZone": "Arizona"
, then a StageNow XML to set the device to Arizona time will be triggered.If the device's current site is associated in the sitelist.csv file with the extended attribute
"siteTimeZone": "Pacific"
, then a StageNow XML to set the device to Pacific time will be triggered.
Last updated