-
public class GeofenceConstantsGeofencing tunables. Ported from the DoorstepCompanion reference implementation (
geofence/GeofenceConstants.kt). Defaults are the proven field values; they can be overridden per-fleet via remote config (com.doorstepai.sdks.tracking.internal.GeofenceConfiguration).
-
-
Field Summary
Fields Modifier and Type Field Description private final LongRE_ENTER_COOLDOWN_MSprivate final FloatRADIUS_Mprivate final IntegerMAX_ACTIVEprivate final FloatRE_REGISTER_THRESHOLD_Mprivate final FloatEXIT_RADIUS_Mprivate final IntegerEXIT_DEBOUNCE_FIXESprivate final FloatMIN_FIX_ACCURACY_Mprivate final FloatENTER_MAX_ACCURACY_Mprivate final FloatNEAR_DISTANCE_Mprivate final LongLOCATION_INTERVAL_NEAR_MSprivate final LongLOCATION_INTERVAL_FAR_MSprivate final IntegerNOTIFICATION_RESPONSIVENESS_MSprivate final LongLOCATION_FASTEST_MSprivate final StringACTION_GEOFENCE_EVENTpublic final static GeofenceConstantsINSTANCE
-
Method Summary
Modifier and Type Method Description final LonggetRE_ENTER_COOLDOWN_MS()A5: re-ENTER cooldown after an internal (timeout-driven) stop, so a timeout firing while the driver is still inside the fence can't loop enter->timeout->enter, minting a server session per cycle. final FloatgetRADIUS_M()Radius of each stop geofence, in meters. final IntegergetMAX_ACTIVE()Max geofences we register at once. final FloatgetRE_REGISTER_THRESHOLD_M()Re-register the nearest-N set once the driver has moved this far (meters) from the center of the last registration. final FloatgetEXIT_RADIUS_M()App-side EXIT radius (> RADIUS_M) for the distance reconcile. final IntegergetEXIT_DEBOUNCE_FIXES()Consecutive out-of-range fixes required before an app-side EXIT (debounce vs transient jitter). final FloatgetMIN_FIX_ACCURACY_M()EXIT accuracy gate (meters): only count a fix toward an app-side EXIT if it's at least this accurate. final FloatgetENTER_MAX_ACCURACY_M()ENTER accuracy gate (meters): accept fixes up to this coarse for ENTER decisions. final FloatgetNEAR_DISTANCE_M()Within this distance (m) of any stop, switch to the dense/high-accuracy location cadence. final LonggetLOCATION_INTERVAL_NEAR_MS()Location update interval (ms) when NEAR a stop — dense + high-accuracy for precise transitions. final LonggetLOCATION_INTERVAL_FAR_MS()Location update interval (ms) when FAR from every stop — sparse + balanced to save battery. final IntegergetNOTIFICATION_RESPONSIVENESS_MS()Play Services geofence responsiveness hint (ms) — lower = faster transitions. final LonggetLOCATION_FASTEST_MS()Floor on how fast fused fixes may arrive (ms). final StringgetACTION_GEOFENCE_EVENT()Broadcast action for geofence transitions delivered to GeofenceBroadcastReceiver. -
-
Method Detail
-
getRE_ENTER_COOLDOWN_MS
final Long getRE_ENTER_COOLDOWN_MS()
A5: re-ENTER cooldown after an internal (timeout-driven) stop, so a timeout firing while the driver is still inside the fence can't loop enter->timeout->enter, minting a server session per cycle. Long enough to outlast a lunch break parked on the fence boundary, short enough that a genuine second visit later in the shift still auto-starts.
-
getRADIUS_M
final Float getRADIUS_M()
Radius of each stop geofence, in meters.
-
getMAX_ACTIVE
final Integer getMAX_ACTIVE()
Max geofences we register at once. Android caps active geofences at 100 per app; we leave headroom below that so registration never silently fails.
-
getRE_REGISTER_THRESHOLD_M
final Float getRE_REGISTER_THRESHOLD_M()
Re-register the nearest-N set once the driver has moved this far (meters) from the center of the last registration. Keeps the active set centered on the driver.
-
getEXIT_RADIUS_M
final Float getEXIT_RADIUS_M()
App-side EXIT radius (> RADIUS_M) for the distance reconcile. Hysteresis: ENTER at 250 m, EXIT only past 300 m, so GPS jitter near the boundary can't flap a delivery on/off.
-
getEXIT_DEBOUNCE_FIXES
final Integer getEXIT_DEBOUNCE_FIXES()
Consecutive out-of-range fixes required before an app-side EXIT (debounce vs transient jitter).
-
getMIN_FIX_ACCURACY_M
final Float getMIN_FIX_ACCURACY_M()
EXIT accuracy gate (meters): only count a fix toward an app-side EXIT if it's at least this accurate. EXIT is the dangerous direction (a false EXIT loses data), so it stays strict.
-
getENTER_MAX_ACCURACY_M
final Float getENTER_MAX_ACCURACY_M()
ENTER accuracy gate (meters): accept fixes up to this coarse for ENTER decisions. Looser than MIN_FIX_ACCURACY_M on purpose — missing an ENTER loses a whole delivery, while a slightly-early ENTER is cheap (EXIT + the SDK timeout clean it up).
-
getNEAR_DISTANCE_M
final Float getNEAR_DISTANCE_M()
Within this distance (m) of any stop, switch to the dense/high-accuracy location cadence.
-
getLOCATION_INTERVAL_NEAR_MS
final Long getLOCATION_INTERVAL_NEAR_MS()
Location update interval (ms) when NEAR a stop — dense + high-accuracy for precise transitions.
-
getLOCATION_INTERVAL_FAR_MS
final Long getLOCATION_INTERVAL_FAR_MS()
Location update interval (ms) when FAR from every stop — sparse + balanced to save battery.
-
getNOTIFICATION_RESPONSIVENESS_MS
final Integer getNOTIFICATION_RESPONSIVENESS_MS()
Play Services geofence responsiveness hint (ms) — lower = faster transitions.
-
getLOCATION_FASTEST_MS
final Long getLOCATION_FASTEST_MS()
Floor on how fast fused fixes may arrive (ms).
-
getACTION_GEOFENCE_EVENT
final String getACTION_GEOFENCE_EVENT()
Broadcast action for geofence transitions delivered to GeofenceBroadcastReceiver.
-
-
-
-