persistMode property

PersistMode? persistMode
final

Allows you to specify which events to persist to the SDK's internal database: locations | geofences | all (default).

Note that all recorded location and geofence events will always be provided to your BackgroundGeolocation.onLocation and BackgroundGeolocation.onGeofence events, just that the persistence of those events in the SDK's internal SQLite database can be limited. Any event which has not been persisted to the SDK's internal database will also not therefore be uploaded to your HttpConfig.url (if configured).

Name Description
PersistMode.all (DEFAULT) Persist both geofence and location events
PersistMode.location Persist only location events (ignore geofence events)
PersistMode.geofence Persist only geofence events (ignore location events)
PersistMode.none Persist nothing (neither geofence nor location events)

See also: HTTP Guide at HttpConfig.

Implementation

final PersistMode? persistMode;