Background Reliability Contract
Background location is a native, best-effort pipeline. Starting it means the library has registered the platform mechanisms described below; it does not promise a fixed delivery interval while the app is backgrounded, suspended, terminated, force-stopped, or constrained by battery policy.
Runtime states
The new status fields do not change existing behavior or defaults. Native
storage remains enabled unless persist: false; Android
stopOnTerminate defaults to true and startOnBoot defaults to false.
Starting Android tracking continues to use the existing foreground service and
Headless fallback.
On Android, a successful startBackgroundLocation() resolves only after the
foreground service and location provider are active. Activity-aware sessions
also wait for Activity Recognition registration. A failed replacement leaves a
previously confirmed standalone Activity Recognition registration intact.
android.isForegroundServiceRunning observes the actual process-local service
lifecycle; it is not an alias for the desired isRunning state.
Status timestamps
getBackgroundLocationStatus() includes two optional native-storage fields:
Both values are Unix timestamps in milliseconds. They are absent when no
matching record is retained, such as in a fresh or reset store. With
persist: false, new records do not advance these fields, but previously
retained records remain visible until they are removed. The fields describe
native recording, not a promise that a live JS listener, Headless task, server
sync, or application UI consumed the record.
Compare them with your own run marker and inspect stored rows instead of using
the counters alone.
Verification matrix
See Long-Run Background E2E for commands and coordinates. A failed device-policy case is evidence to diagnose, not a reason to weaken the assertion.
