Skip to main content
Version: 4.55

startLocationTracking

Starts the location tracking of a device

Field Configurations

KeyTypeDescriptionDefault Value
"params"Objectundefinednull

Parameters

KeyTypeDescriptionDefault Value
"actions"ArrayActions which are executed when a new position is set.null
"addressFormDataKey"StringThe key under which the address should be stored.null
"async"BooleanSpecifies whether the action should perform asynchronously.null
"background"Boolean,StringSpecifies whether tracking should work in the background.null
"disabledMessage"StringMessage which is displayed if the user location is deactivated.null
"failedMessage"StringMessage which is displayed in case of an error.null
"fireMultipleEvents"Boolean,StringSpecifies whether the position and address events should be fired multiple times.null
"latitudeFormDataKey"StringThe key under which the latitude should be stored.null
"loadingMessage"StringThe message which is displayed during positioning.null
"longitudeFormDataKey"StringThe key under which the longitude should be stored.null
"onAddress"StringEvent which is fired when the address is determined.null
"onError"StringEvent which is fired in case of an error.null
"onErrorType"StringThe type of onError event.null
"onPosition"StringEvent which is fired when the user location is determined.null
"onSuccess"StringEvent which will be fired in case of success.null
"onSuccessType"StringThe type of onSuccess event.null

Inherited

From Base Action

Base Action

Field Configurations

KeyTypeDescriptionDefault Value
"dynamicParams"ObjectDynamic params to retrieve data from a specific context e.g. a userSetting.null
"leadingDelimiter"StringThe leading mustache delimiter to use.null
"params"Object,ArrayObject containing the properties of the action.null
"trailingDelimiter"StringThe trailing mustache delimiter to use.null
"type"StringType name of the action.null

Examples

Example 1: Share a device's location.

Goal: Share a device's location, including latitude, longitude, and address.

To achieve this the following code can be used:

{
"type": "startLocationTracking",
"params": {
"addressFormDataKey": "o",
"latitudeFormDataKey": "lat",
"longitudeFormDataKey": "lon",
"deniedMessage": "Please activate the location services for this app in the settings of your device",
"disabledMessage": "Please activate the location services for this app in the settings of your device",
"failedMessage": "Your location cannot currently be determined",
"loadingMessage": "Your location is being determined...",
"onError": "",
"onSuccess": ""
}
}

Result:

The device's location will be shared.