Skip to content

Configuration

BeekonConfig has two arms: SelfManaged (you set the gate locally — these docs) and Cloud (server-owned config via a project key — see Beekon Cloud). This page is the single, authoritative reference for the SelfManaged fields. The Quickstart shows the minimal set; everything else is here.

SelfManaged tracking is built around two scalars — a minimum time interval and a minimum distance between emitted fixes. They form an AND-gate: a position is emitted only when both pass.

(now - lastAdmittedTime >= intervalSeconds) AND
(distance(lastAdmittedFix) >= distanceMeters)

The first fix after start() always passes. Set either field to 0 to disable that side of the gate. That’s the entire signal-processing surface in v1 — no Kalman filter, no outlier rejection, no speed clamp. The OS provider (FusedLocationProviderClient / Core Location) is the source of truth; Beekon forwards it faithfully.

FieldTypeDefaultNotes
minTimeBetweenLocationsSecondsLong / Int / int / number30Min seconds between kept fixes. 0 disables the time gate.
minDistanceBetweenLocationsMetersDouble / Double / double / number100Min metres between kept fixes. 0 disables the distance gate; AND-ed with time.
accuracyModeAccuracyModebalancedBattery-vs-accuracy preset — see enums.
whenStationaryStationaryModepauseWhat to do while the device is still — see enums. New in 0.1.1.
stationaryRadiusMetersDouble / Double / double / number5Radius of the internal stationary geofence. Clamped to 5…1000.
detectActivityBoolean / Bool / bool / booleanfalseClassify physical motion onto each fix. Needs a second OS permission — see Locations & history.
syncSyncConfig?nullServer upload config. Omit for local-only.
notificationNotificationConfigForeground-service notification. Android only. See below.
licenseKeyString?nullSigned license token — see Licensing.
logLevelLogLevelinfoDiagnostic log threshold — see Diagnostics.

Type columns read Android / iOS / Flutter / React Native.

AccuracyMode — battery vs. accuracy:

ValueAndroidiOS / FlutterReact NativeBehaviour
HighAccuracyMode.High.high / AccuracyMode.high'high'Most accurate fixes, highest battery cost
Balanced (default)AccuracyMode.Balanced.balanced / AccuracyMode.balanced'balanced'City-block accuracy at moderate cost
LowAccuracyMode.Low.low / AccuracyMode.low'low'Coarse, low-power fixes; distance gate floored to 500 m

StationaryMode — behaviour while the device is still:

ValueAndroidiOS / FlutterReact NativeBehaviour
Keep trackingStationaryMode.KeepTracking.keepTracking / StationaryMode.keepTracking'keepTracking'Keep admitting fixes even while stationary. Highest battery cost.
Pause (default)StationaryMode.Pause.pause / StationaryMode.pause'pause'Stop admitting fixes while stationary; resume silently on movement.
Pause with check-insStationaryMode.PauseWithCheckIns.pauseWithCheckIns / StationaryMode.pauseWithCheckIns'pauseWithCheckIns'Stop while stationary, but record a check-in fix roughly every 15 minutes.

Android requires a visible foreground-service notification while location is captured in the background. Set it via BeekonConfig.notification — it’s ignored on iOS.

FieldTypeDefaultNotes
titlestring"Tracking location"Notification title.
textstringnullNotification body. null shows the title only.
smallIconstringnullStatus-bar icon — an Android drawable/mipmap resource name. null falls back to the launcher icon.

Call configure(...) again at any time — including while tracking — to update the gate. New values take effect on the next admitted fix without restarting the underlying location subscription.

// Tighten cadence mid-session
Beekon.configure(
BeekonConfig.SelfManaged(
minTimeBetweenLocationsSeconds = 5,
minDistanceBetweenLocationsMeters = 25.0,
accuracyMode = AccuracyMode.High,
whenStationary = StationaryMode.Pause,
notification = notification,
),
)

The defaults (30 s / 100 m, balanced, pause) are a good general-purpose starting point. Adjust per scenario:

ScenariointervalSecondsdistanceMetersaccuracyModeNotes
Passive background (“where did I go?”)60150lowCoarse trail; cheaper on battery
General tracking (default)30100balancedDriving, cycling, multi-hour walks
Active foreground (turn-by-turn, fitness)5102550highUsers feel the battery hit in background
Stationary monitoring (geofence-like)0100balancedEmit only on movement, not on cadence

These are starting points, not presets — calibrate against your own data.