Skip to main content
Version: 4.62

startLocationTracking

Starts the location tracking on the users device. This tracking will be controlled by the device and operating system and will be reported in irregular intervals based on the relative position change from the last reported position, the speed and velocity of the device, etc.

note

Tracking users location in background is highly restricted by both Apple and Google and requires a significant insight into policies by the system providers. It will also consume the devices battery at a much higher rate then usual which some systems will actively report to the user. Furthermore, since this area of functionality is still facing a lot of changes, some options may present differently then discribed.

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
"progressBarBackground"ColorThe background color of the progress bar when the initial location is retrieved.null
"progressBarColor"ColorThe color of the progress bar when the initial location is retrieved.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: Start tracking the device's location

Show ExampleHide Example

The device's location data will be stored in the speciefied from data keys.

{
"type": "startLocationTracking",
"params": {
"addressFormDataKey": "add",
"latitudeFormDataKey": "lat",
"longitudeFormDataKey": "lon",
"deniedMessage": "$lang(startLocationTrackiung01denied)$",
"disabledMessage": "$lang(startLocationTrackiung01disabled)$",
"failedMessage": "$lang(startLocationTrackiung01failed)$",
"loadingMessage": "$lang(startLocationTrackiung01loading)$"
}
}