Skip to content

Beekon documentation

Beekon is a background location SDK for Android, iOS, Flutter and React Native. It records the device’s location while your app is open, in the background and after the OS stops the app, keeps every location in an on-device history, and uploads them to your own server or to Beekon Cloud.

  1. Get a first location on the device. The SDK quickstart installs the SDK, asks for permission and starts tracking.
  2. Send locations to a backend. To your own server: turn on sync and build the ingest endpoint. To Beekon Cloud, in early access: configure Cloud mode with your SDK key.
  3. Receive a geofence event. On Beekon Cloud, create a geofence and a webhook and watch the event arrive: your first geofence event. On your own server, crossings arrive in each upload’s geofence_events.
// In Application.onCreate
Beekon.configure(BeekonConfig.Local())
// In an Activity, from a button in your onboarding
lifecycleScope.launch {
Beekon.requestNextNeededPermission(this@MainActivity) // foreground location
// Later, on its own screen: background location
Beekon.requestPermission(this@MainActivity, BeekonPermission.BackgroundLocation)
Beekon.start()
Beekon.locations.collect { loc ->
Log.d("beekon", "${loc.latitude}, ${loc.longitude}")
}
}

The SDK quickstart adds the OS declarations, error handling and resuming after the OS stops your app.

  1. The SDK records. It keeps a location when both a minimum time and a minimum distance have passed since the last one (30 s and 100 m by default), and writes it to a local SQLite history. It applies no other filtering: the coordinates are what the OS reported.
  2. The SDK uploads, if you ask it to. In Custom mode it uploads batches to your server, with retries and token refresh. In Local mode nothing leaves the device. In Cloud mode it uploads to Beekon Cloud, which also sends the device its settings.
  3. Your backend uses the data. Your own endpoint receives a small, fixed JSON format, or Beekon Cloud stores the locations, cuts them into trips, detects geofence crossings and sends you webhooks.

All four SDKs are at version 0.6.0 and share one API. Android and iOS are native libraries, written in Kotlin and Swift; Flutter and React Native call them, so tracking behaves the same on every platform.

SDKPackageAndroidiOS
Androidio.github.beekonlabs:beekon (Maven Central)8.0 (API 26) or later
iOSBeekonKit (Swift Package Manager)15 or later
Flutterbeekon_flutter (pub.dev)8.0 (API 26) or later17 or later
React Native@wayq/beekon-rn (npm), New Architecture, RN 0.76 or later8.0 (API 26) or later17 or later

On Android, every SDK needs the app to compile with compileSdk 36 or higher.