-
@Serializable() public final class GeofenceConfigurationServer-driven tuning for in-SDK route geofencing (mirrors iOS
GeofenceConfiguration). All fields default to the proven DoorstepCompanion values so older config responses (without ageofenceblock) keep working unchanged. Consumed via com.doorstepai.sdks.tracking.internal.geofence.GeofenceParams.fromRemoteConfig.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classGeofenceConfiguration.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Booleanenabledprivate final FloatdefaultRadiusMetersprivate final IntegermaxActiveGeofencesprivate final FloatreRegisterThresholdMetersprivate final FloatnearDistanceMetersprivate final FloatenterMaxAccuracyMetersprivate final FloatexitMaxAccuracyMetersprivate final FloatexitHysteresisMetersprivate final IntegerexitDebounceFixesprivate final DoublesessionTimeoutSecondsprivate final LongnearIntervalMsprivate final LongfarIntervalMsprivate final StringnearPriorityprivate final StringfarPriorityprivate final LongfastestIntervalMsprivate final IntegerresponsivenessMsprivate final StringworkQueueQosClass
-
Constructor Summary
Constructors Constructor Description GeofenceConfiguration(Boolean enabled, Float defaultRadiusMeters, Integer maxActiveGeofences, Float reRegisterThresholdMeters, Float nearDistanceMeters, Float enterMaxAccuracyMeters, Float exitMaxAccuracyMeters, Float exitHysteresisMeters, Integer exitDebounceFixes, Double sessionTimeoutSeconds, Long nearIntervalMs, Long farIntervalMs, String nearPriority, String farPriority, Long fastestIntervalMs, Integer responsivenessMs, String workQueueQosClass)
-
Method Summary
Modifier and Type Method Description final BooleangetEnabled()Feature flag. final FloatgetDefaultRadiusMeters()Default geofence radius (meters) for stops that don't set their own. final IntegergetMaxActiveGeofences()Max geofences registered at once. final FloatgetReRegisterThresholdMeters()Re-register the nearest-N set once the driver moves this far (meters). final FloatgetNearDistanceMeters()Within this distance (meters) of any stop, use the dense/high-accuracy cadence. final FloatgetEnterMaxAccuracyMeters()ENTER accuracy gate (meters) — looser; missing an ENTER loses a delivery. final FloatgetExitMaxAccuracyMeters()EXIT accuracy gate (meters) — strict; a false EXIT loses data. final FloatgetExitHysteresisMeters()Hysteresis (meters) added to the radius for the app-side EXIT (ENTER at r, EXIT past r+this). final IntegergetExitDebounceFixes()Consecutive out-of-range fixes required before an app-side EXIT. final DoublegetSessionTimeoutSeconds()Backstop timeout (seconds) for a geofence-started session: the SDK force-stops it this long after start even if no dropoff + EXIT ever arrives (e.g. final LonggetNearIntervalMs()Fused-location update interval (ms) when NEAR a stop. final LonggetFarIntervalMs()Fused-location update interval (ms) when FAR from every stop. final StringgetNearPriority()Fused-location request Priority when NEAR a stop. final StringgetFarPriority()Fused-location request Priority when FAR from every stop (same vocabulary as nearPriority). final LonggetFastestIntervalMs()Floor (ms) on how fast fused fixes may arrive (setMinUpdateIntervalMillis); <=0 -> default. final IntegergetResponsivenessMs()Play Services geofence responsiveness hint (ms) — lower = faster transitions. final StringgetWorkQueueQosClass()Priority of the serial background thread that owns all geofence reconcile work (distance loop, cadence, ENTER/EXIT) — so none of it runs on the main/UI thread. -
-
Constructor Detail
-
GeofenceConfiguration
GeofenceConfiguration(Boolean enabled, Float defaultRadiusMeters, Integer maxActiveGeofences, Float reRegisterThresholdMeters, Float nearDistanceMeters, Float enterMaxAccuracyMeters, Float exitMaxAccuracyMeters, Float exitHysteresisMeters, Integer exitDebounceFixes, Double sessionTimeoutSeconds, Long nearIntervalMs, Long farIntervalMs, String nearPriority, String farPriority, Long fastestIntervalMs, Integer responsivenessMs, String workQueueQosClass)
-
-
Method Detail
-
getEnabled
final Boolean getEnabled()
Feature flag. When false, com.doorstepai.sdks.tracking.DoorstepAI.startRouteGeofencing no-ops.
-
getDefaultRadiusMeters
final Float getDefaultRadiusMeters()
Default geofence radius (meters) for stops that don't set their own.
-
getMaxActiveGeofences
final Integer getMaxActiveGeofences()
Max geofences registered at once. Android caps at 100; we leave headroom (95).
-
getReRegisterThresholdMeters
final Float getReRegisterThresholdMeters()
Re-register the nearest-N set once the driver moves this far (meters).
-
getNearDistanceMeters
final Float getNearDistanceMeters()
Within this distance (meters) of any stop, use the dense/high-accuracy cadence.
-
getEnterMaxAccuracyMeters
final Float getEnterMaxAccuracyMeters()
ENTER accuracy gate (meters) — looser; missing an ENTER loses a delivery.
-
getExitMaxAccuracyMeters
final Float getExitMaxAccuracyMeters()
EXIT accuracy gate (meters) — strict; a false EXIT loses data.
-
getExitHysteresisMeters
final Float getExitHysteresisMeters()
Hysteresis (meters) added to the radius for the app-side EXIT (ENTER at r, EXIT past r+this).
-
getExitDebounceFixes
final Integer getExitDebounceFixes()
Consecutive out-of-range fixes required before an app-side EXIT.
-
getSessionTimeoutSeconds
final Double getSessionTimeoutSeconds()
Backstop timeout (seconds) for a geofence-started session: the SDK force-stops it this long after start even if no dropoff + EXIT ever arrives (e.g. a drive-past, or a delivery the driver never marked). A per-route com.doorstepai.sdks.tracking.RouteGeofenceOptions.timeoutSeconds overrides this. Backed by a Doze-safe AlarmManager alarm so it survives process death.
-
getNearIntervalMs
final Long getNearIntervalMs()
Fused-location update interval (ms) when NEAR a stop.
-
getFarIntervalMs
final Long getFarIntervalMs()
Fused-location update interval (ms) when FAR from every stop.
-
getNearPriority
final String getNearPriority()
Fused-location request Priority when NEAR a stop. One of
highAccuracy/balancedPowerAccuracy/lowPower/passive(case-insensitive). The dominant battery lever. DefaulthighAccuracy; unknown values fall back to the default.
-
getFarPriority
final String getFarPriority()
Fused-location request Priority when FAR from every stop (same vocabulary as nearPriority).
-
getFastestIntervalMs
final Long getFastestIntervalMs()
Floor (ms) on how fast fused fixes may arrive (setMinUpdateIntervalMillis); <=0 -> default.
-
getResponsivenessMs
final Integer getResponsivenessMs()
Play Services geofence responsiveness hint (ms) — lower = faster transitions.
-
getWorkQueueQosClass
final String getWorkQueueQosClass()
Priority of the serial background thread that owns all geofence reconcile work (distance loop, cadence, ENTER/EXIT) — so none of it runs on the main/UI thread. Android's analog of the iOS
workQueueQosClass(same key + vocabulary for cross-platform config parity); mapped to anandroid.os.Processthread priority:userInteractive→URGENT_DISPLAY,userInitiated→FOREGROUND,default→DEFAULT,utility→BACKGROUND,background→LOWEST (case-insensitive). DefaultuserInitiatedkeeps detection low-latency under load; lower it for a fleet-level battery trade-off. Applied when the reconcile thread is first created.
-
-
-
-