Tracking Options Reference
For background tracking, Radar's SDK supports custom tracking options as well as three presets: EFFICIENT
, RESPONSIVE
, and CONTINUOUS
.
#
Configuring Tracking OptionsWhile it's recommended to use one of the three optimized presets, custom parameters can also be passed at the time of tracking initialization. Additionally, you can also choose to forgo setting background tracking options as part of SDK initialization and override to any of the three preset on the Radar dashboard using Remote Tracking Options.
- Swift
- Objective-C
- Java
- Kotlin
let trackingOptions = RadarTrackingOptions.presetResponsivetrackingOptions.beacons = trueRadar.startTracking(trackingOptions: trackingOptions)
RadarTrackingOptions *trackingOptions = RadarTrackingOptions.presetResponsive;trackingOptions.beacons = YES;[Radar startTrackingWithOptions:trackingOptions];
RadarTrackingOptions trackingOptions = RadarTrackingOptions.RESPONSIVE;trackingOptions.beacons = true;Radar.startTracking(trackingOptions);
val trackingOptions = RadarTrackingOptions.RESPONSIVEtrackingOptions.beacons = trueRadar.startTracking(trackingOptions)
#
Tracking statesThe SDK has two states: stopped and moving. After a location update is made, a user then occupies one of these two states. Tracking Options can be customized to alter the frequency of updates when a user is either stopped or moving. While less common to adjust, stopDuration
and stopDistance
are Tracking Options that alter the intervals after which a user is assumed to be stopped.
#
iOS#
iOS optionsdesiredStoppedUpdateInterval
: Determines the desired location update interval in seconds when stopped. Use0
to shut down when stopped.desiredMovingUpdateInterval
: Determines the desired location update interval in seconds when moving. Note that location updates may be delayed significantly by Low Power Mode, or if the device has connectivity issues, low battery, or wi-fi disabled.desiredSyncInterval
: Determines the desired sync interval in seconds.desiredAccuracy
: Determines the desired accuracy of location updates..high
useskCLLocationAccuracyBest
,.medium
useskCLLocationAccuracyHundredMeters
,.low
useskCLLocationAccuracyKilometer
.stopDuration
: WithstopDistance
, determines the duration in seconds after which the device is considered stopped.stopDistance
: WithstopDuration
, determines the distance in meters within which the device is considered stopped.startTrackingAfter
: Determines when to start tracking. Usenil
to start tracking whenstartTracking
is called.stopTrackingAfter
: Determines when to stop tracking. Usenil
to track untilstopTracking
is called.replay
: Determines which failed location updates to replay to the server..replayStops
replays failed stops,.replayNone
replays no location updates.syncLocations
: Determines which location updates to sync to the server..all
syncs all location updates to the server,.stopsAndExits
syncs only stops and exits to the server,.none
syncs no location updates to the server.showBlueBar
: Determines whether the flashing blue status bar is shown when tracking.useStoppedGeofence
: Determines whether to use the iOS region monitoring service (geofencing) to create a client-side geofence "bubble" around the device's current location when stopped.stoppedGeofenceRadius
: Determines the radius in meters of the client-side geofence "bubble" around the device's current location when stopped. Use smaller values (e.g.,100
meters) for faster exit events or larger values (e.g.,200
meters) to avoid jumpy exits while stopped.useMovingGeofence
: Determines whether to use the iOS region monitoring service (geofencing) to create a client-side geofence "bubble" around the device's current location when moving.movingGeofenceRadius
: Determines the radius in meters of the client-side geofence "bubble" around the device's current location when moving.syncGeofences
: Determines whether to sync nearby geofences from the server to the client to improve responsiveness.useVisits
: Determines whether to use the iOS visit monitoring service.useSignificantLocationChanges
: Determines whether to use the iOS significant location change service.beacons
: Determines whether to monitor beacons.
#
iOS presetsRadarTrackingOptions.presetContinuous
: Updates about every 30 seconds while moving or stopped. Moderate battery usage. Shows the flashing blue status bar during tracking.RadarTrackingOptions.presetResponsive
: Updates about every 2.5 minutes when moving and shuts down when stopped to save battery. Once stopped, the device will need to move more than 100 meters to wake up and start moving again. Low battery usage. Requires thelocation
background mode.RadarTrackingOptions.presetEfficient
: Uses the iOS visit monitoring service to update only on stops and exits. Once stopped, the device will need to move several hundred meters and trigger a visit departure to wake up and start moving again. Lowest battery usage.
Option | Efficient | Responsive | Continuous |
---|---|---|---|
desiredStoppedUpdateInterval | 0 | 0 | 30 |
desiredMovingUpdateInterval | 0 | 150 | 30 |
desiredSyncInterval | 0 | 20 | 20 |
desiredAccuracy | .medium | .medium | .high |
stopDuration | 0 | 140 | 140 |
stopDistance | 0 | 70 | 70 |
startTrackingAfter | nil | nil | nil |
stopTrackingAfter | nil | nil | nil |
replay | .stops | .stops | .none |
syncLocations | .all | .all | .all |
showBlueBar | false | false | true |
useStoppedGeofence | false | true | false |
stoppedGeofenceRadius | 0 | 100 | 0 |
useMovingGeofence | false | false | false |
movingGeofenceRadius | 0 | 0 | 0 |
syncGeofences | true | true | false |
useVisits | true | true | false |
useSignificantLocationChanges | false | true | false |
beacons | false | false | false |
#
Android#
Android optionsdesiredStoppedUpdateInterval
: Determines the desired location update interval in seconds when stopped. Use0
to shut down when stopped.fastestStoppedUpdateInterval
: Determines the fastest location update interval in seconds when stopped.desiredMovingUpdateInterval
: Determines the desired location update interval in seconds when moving. Note that location updates may be delayed significantly by Doze Mode, App Standby, and Background Location Limits, or if the device has connectivity issues, low battery, or wi-fi disabled. To avoid these restrictions, you can start a foreground service.fastestMovingUpdateInterval
: Determines the fastest location update interval in seconds when stopped.desiredSyncInterval
: Determines the desired sync interval in seconds.desiredAccuracy
: Determines the desired accuracy of location updates.HIGH
usesPRIORITY_HIGH_ACCURACY
,MEDIUM
usesPRIORITY_BALANCED_POWER_ACCURACY
,LOW
usesPRIORITY_LOW_POWER
,NONE
usesPRIORITY_NO_POWER
.stopDuration
: WithstopDistance
, determines the duration in seconds after which the device is considered stopped.stopDistance
: WithstopDuration
, determines the distance in meters within which the device is considered stopped.startTrackingAfter
: Determines when to start tracking. Usenull
to start tracking whenstartTracking()
is called.stopTrackingAfter
: Determines when to stop tracking. Usenull
to track untilstopTracking()
is called.replay
: Determines which failed location updates to replay to the server.STOPS
replays failed stops,NONE
replays no location updates.sync
: Determines which location updates to sync to the server.ALL
syncs all location updates to the server,STOPS_AND_EXITS
syncs only stops and exits to the server,NONE
syncs no location updates to the server.useStoppedGeofence
: Determines whether to create a client-side geofence "bubble" around the device's current location when stopped.stoppedGeofenceRadius
: Determines the radius in meters of the client-side geofence "bubble" around the device's current location when stopped. Use smaller values (e.g.,100
meters) for faster exit events or larger values (e.g.,200
meters) to avoid jumpy exits while stopped.useMovingGeofence
: Determines whether to create a client-side geofence "bubble" around the device's current location when moving.movingGeofenceRadius
: Determines the radius in meters of the client geofence around the device's current location when moving.syncGeofences
: Determines whether to sync nearby geofences from the server to the client to improve responsiveness.syncGeofencesLimit
: Determines how many nearby geofences to sync from the server to the client whensyncGeofences
is enabled.foregroundService
: If set, starts a foreground service and shows a notification during tracking.beacons
: Determines whether to monitor beacons.
#
Android foreground service optionsTo avoid Background Location Limits, you can start a foreground service and show a notification during tracking. Set trackingOptions.foregroundService
to an instance of RadarTrackingOptionsForegroundService
.
text
: Determines the notification text. Defaults to"Location tracking started"
.title
: Determines the notification title. Optional.icon
: Determines the notification icon, likeR.drawable.ic_your_icon
. Optional, defaults toapplicationContext.applicationInfo.icon
.updatesOnly
: Determines when to show the notification. Usefalse
to show the notification always, usetrue
to show the notification only during location updates. Optional, defaults tofalse
.activity
: Determines the activity to start when the notification is tapped, like"com.yourapp.MainActivity"
. Optional.importance
: Determines the importance of the notification, one ofandroid.app.NotificationManager.IMPORTANCE_*
. Optional, defaults toandroid.app.NotificationManager.IMPORTANCE_DEFAULT
.id
: Determines the id of the notification. Optional, defaults to20160525
.
#
Android presetsRadarTrackingOptions.CONTINUOUS
: Updates about every 30 seconds while moving or stopped. Starts a foreground service. Moderate battery usage.RadarTrackingOptions.RESPONSIVE
: Updates about every 2.5 minutes while moving and shuts down when stopped to save battery. Once stopped, the device will need to move more than 100 meters to wake up and start moving again. Low battery usage, but may exceed Android vitals bad behavior thresholds for excessive wakeups and excessive wi-fi scans.RadarTrackingOptions.EFFICIENT
: Updates as fast as every 6 minutes while moving and periodically when stopped. Once stopped, the device will need to move more than 100 meters and wait for at least 15 minutes to wake up and start moving again. Lowest battery usage and will not exceed Android vitals bad behavior thresholds.
Option | Efficient | Responsive | Continuous |
---|---|---|---|
desiredStoppedUpdateInterval | 3600 | 0 | 30 |
fastestStoppedUpdateInterval | 1200 | 0 | 30 |
desiredMovingUpdateInterval | 1200 | 150 | 30 |
fastestMovingUpdateInterval | 360 | 30 | 30 |
desiredSyncInterval | 140 | 20 | 20 |
desiredAccuracy | MEDIUM | MEDIUM | HIGH |
stopDuration | 140 | 140 | 0 |
stopDistance | 70 | 70 | 0 |
startTrackingAfter | null | null | null |
stopTrackingAfter | null | null | null |
replay | STOPS | STOPS | NONE |
sync | ALL | ALL | ALL |
useStoppedGeofence | false | true | false |
stoppedGeofenceRadius | 0 | 100 | 0 |
useMovingGeofence | false | true | false |
movingGeofenceRadius | 0 | 100 | 0 |
syncGeofences | true | true | false |
syncGeofencesLimit | 10 | 10 | 0 |
foregroundService | null | null | null |
beacons | false | false | false |
#
Remote tracking optionsSDK tracking options can be set in dashboard settings for iOS and Android with the three default presets.

Tracking options can be targeted by OS (Android and iOS) and environment (live and test). By setting tracking options, any client configuration for tracking options set in the SDK will be overridden.