Skip to content

WatchPositionRequest

Options for BackgroundGeolocation.watchPosition.

Configures the interval, accuracy, persistence, and metadata for a continuous location stream. All fields are optional.

Warning

watchPosition is intended for foreground use. On iOS it prevents the app from being suspended, which drains the battery. Remove the subscription when your app moves to the background.


Members

desiredAccuracy

Target accuracy for location updates from the native API. Defaults to DesiredAccuracy.High.

extras

Optional key-value metadata to attach to each location. Merged with any configured PersistenceConfig.extras before persisting or uploading to HttpConfig.url.

interval

Interval in milliseconds between location updates.

persist

Whether to persist each location to the SDK's SQLite database and upload it to HttpConfig.url. Defaults to true when the SDK is enabled; false when stopped.

timeout

Maximum time in milliseconds to wait for each location fix before firing an error. Default 60000.