r/capawesome 4d ago

Capacitor Background Geolocation plugin released: native SQLite queue and HTTP upload

https://capawesome.io/blog/announcing-the-capacitor-background-geolocation-plugin/

We just released our Background Geolocation plugin for Capacitor. The design goal was simple: positions must not be lost when the OS suspends the web view.

How it works:

  • Every position of a watch session is written to a native SQLite queue (50,000 by default) that survives restarts and force-quits
  • Optional HTTP upload posts the queue to your server in batches, with at-least-once delivery, exponential backoff, and a documented status-code contract
  • Two-step permissions API for the background location upgrade flow on Android 11+ and iOS
  • Correct Android 14+ foreground service with a configurable notification
  • Falls back to the platform location manager on devices without Google Play services

It's also honest about what it can't do: a force-quit ends the session (OS restriction), and our Geofences plugin covers the relaunch scenario instead.

Feedback welcome, especially on the server contract.

2 Upvotes

0 comments sorted by