Skip to main content

reliable_background_location 0.1.0 copy "reliable_background_location: ^0.1.0" to clipboard
reliable_background_location: ^0.1.0 copied to clipboard

PlatformAndroid

Background location tracking on Android that keeps recording through Doze, screen-off, battery saver and process death, and reports refused foreground service starts instead of failing silently.

0.1.0 #

Initial release. Android only.

  • start() returns a StartResult that distinguishes the reasons Android refuses a foreground service start, rather than throwing or failing silently.
  • requestPermissions() prompts in the order Android accepts — foreground location and notifications first, then background location as a separate request, since from Android 11 the two cannot share one prompt.
  • PermissionState separates canStart from isComplete, so a caller can tell "cannot track" from "will track until the app leaves the screen".
  • Native buffering of fixes recorded while no Dart isolate is alive, drained through drainBuffered().
  • sessionState persisted natively and returned in StartResult.recoveredSessionState after the OS restarts a killed service.
  • Partial wakelock held for the session, so Doze does not suspend the isolate while the foreground service is up.
  • Helpers for battery saver state and the vendor auto-start settings screens.

Verified on a physical device: live tracking, screen-off continuity, recovery of fixes buffered across process death, and START_STICKY service restart.

2
likes
150
points
139
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Background location tracking on Android that keeps recording through Doze, screen-off, battery saver and process death, and reports refused foreground service starts instead of failing silently.

Repository (GitHub)
View/report issues

Topics

#location #geolocation #background #android #gps

License

MIT (license)

Dependencies

flutter

More

Packages that depend on reliable_background_location

Packages that implement reliable_background_location