Skip to main content

Tracking Options Reference

For background tracking, the SDK supports custom tracking options as well as three presets: EFFICIENT, RESPONSIVE, and CONTINUOUS.

Though we recommend using presets for most use cases, you can modify them.

The SDK has two states: stopped and moving. stopDuration and stopDistance determine whether a location update is considered stopped, and the other options determine tracking behavior depending on state.

iOS#

iOS options#

  • desiredStoppedUpdateInterval: Determines the desired location update interval in seconds when stopped. Use 0 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 uses kCLLocationAccuracyBest, .medium uses kCLLocationAccuracyHundredMeters, .low uses kCLLocationAccuracyKilometer.
  • stopDuration: With stopDistance, determines the duration in seconds after which the device is considered stopped.
  • stopDistance: With stopDuration, determines the distance in meters within which the device is considered stopped.
  • startTrackingAfter: Determines when to start tracking. Use nil to start tracking when startTracking is called.
  • stopTrackingAfter: Determines when to stop tracking. Use nil to track until stopTracking is called.
  • replay: Determines which failed location updates to replay to the server. .replayStops replays failed stops, .replayNone replays no location updates.
  • sync: 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 presets#

  • RadarTrackingOptions.continuous: Updates about every 30 seconds while moving or stopped. Moderate battery usage. Shows the flashing blue status bar during tracking.
  • RadarTrackingOptions.responsive: 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 the location background mode.
  • RadarTrackingOptions.efficient: 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.
OptionEfficientResponsiveContinuous
desiredStoppedUpdateInterval0030
desiredMovingUpdateInterval015030
desiredSyncInterval02020
desiredAccuracy.medium.medium.high
stopDuration0140140
stopDistance07070
startTrackingAfternilnilnil
stopTrackingAfternilnilnil
replay.stops.stops.none
sync.all.all.all
showBlueBarfalsefalsetrue
useStoppedGeofencefalsetruefalse
stoppedGeofenceRadius01000
useMovingGeofencefalsefalsefalse
movingGeofenceRadius000
syncGeofencestruetruefalse
useVisitstruetruefalse
useSignificantLocationChangesfalsetruefalse
beaconsfalsefalsefalse

Android#

Android options#

  • desiredStoppedUpdateInterval: Determines the desired location update interval in seconds when stopped. Use 0 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 uses PRIORITY_HIGH_ACCURACY, MEDIUM uses PRIORITY_BALANCED_POWER_ACCURACY, LOW uses PRIORITY_LOW_POWER, NONE uses PRIORITY_NO_POWER.
  • stopDuration: With stopDistance, determines the duration in seconds after which the device is considered stopped.
  • stopDistance: With stopDuration, determines the distance in meters within which the device is considered stopped.
  • startTrackingAfter: Determines when to start tracking. Use null to start tracking when startTracking() is called.
  • stopTrackingAfter: Determines when to stop tracking. Use null to track until stopTracking() 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 when syncGeofences is enabled.
  • foregroundService: If set, starts a foreground service and shows a notification during tracking.
  • beacons: Determines whether to monitor beacons.

Android presets#

  • RadarTrackingOptions.CONTINUOUS: Updates about every 30 seconds while moving or stopped. Moderate battery usage. Starts a foreground service and shows a notification during tracking.
  • 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.
OptionEfficientResponsiveContinuous
desiredStoppedUpdateInterval3600030
fastestStoppedUpdateInterval1200030
desiredMovingUpdateInterval120015030
fastestMovingUpdateInterval3603030
desiredSyncInterval1402020
desiredAccuracyMEDIUMMEDIUMHIGH
stopDuration1401400
stopDistance70700
startTrackingAfternullnullnull
stopTrackingAfternullnullnull
replaySTOPSSTOPSNONE
syncALLALLALL
useStoppedGeofencefalsetruefalse
stoppedGeofenceRadius01000
useMovingGeofencefalsetruefalse
movingGeofenceRadius01000
syncGeofencestruetruefalse
syncGeofencesLimit10100
foregroundServicenullnullnull
beaconsfalsefalsefalse