-
@Serializable() public final class LocationConfiguration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classLocationConfiguration.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Booleanenabledprivate final LonggpsIntervalMsprivate final LongnetworkIntervalMsprivate final FloatminDistanceMetersprivate final BooleanuseNetworkProviderprivate final Stringproviderprivate final LongbatchMaxDelayMsprivate final LongstallTimeoutMsprivate final Stringpriorityprivate final BooleanwaitForAccurateLocationprivate final Stringgranularityprivate final LongminUpdateIntervalMsprivate final LocationFieldsConfigurationfields
-
Constructor Summary
Constructors Constructor Description LocationConfiguration(Boolean enabled, Long gpsIntervalMs, Long networkIntervalMs, Float minDistanceMeters, Boolean useNetworkProvider, String provider, Long batchMaxDelayMs, Long stallTimeoutMs, String priority, Boolean waitForAccurateLocation, String granularity, Long minUpdateIntervalMs, LocationFieldsConfiguration fields)
-
Method Summary
Modifier and Type Method Description final BooleangetEnabled()final LonggetGpsIntervalMs()final LonggetNetworkIntervalMs()final FloatgetMinDistanceMeters()final BooleangetUseNetworkProvider()final StringgetProvider()Location source flag. final LonggetBatchMaxDelayMs()Max time (ms) location fixes may buffer OS-side before a batched flush (fused path setMaxUpdateDelayMillis/ platform batched delivery).final LonggetStallTimeoutMs()Stall watchdog: if no fix arrives for this long while recording, re-register the providers (catches a silently-dead source). final StringgetPriority()Fused request priority (server-tunable; was hardcoded). final BooleangetWaitForAccurateLocation()Withhold the first fix until it is accurate. final StringgetGranularity()Location granularity for the fused request: "fine" (default, mirrors ACCESS_FINE_LOCATION), "coarse", or "permission" (whatever the grant allows). final LonggetMinUpdateIntervalMs()Fastest accepted update interval (ms) — fused setMinUpdateIntervalMillis.final LocationFieldsConfigurationgetFields()Per-field collection controls (S-012). -
-
Constructor Detail
-
LocationConfiguration
LocationConfiguration(Boolean enabled, Long gpsIntervalMs, Long networkIntervalMs, Float minDistanceMeters, Boolean useNetworkProvider, String provider, Long batchMaxDelayMs, Long stallTimeoutMs, String priority, Boolean waitForAccurateLocation, String granularity, Long minUpdateIntervalMs, LocationFieldsConfiguration fields)
-
-
Method Detail
-
getEnabled
final Boolean getEnabled()
-
getGpsIntervalMs
final Long getGpsIntervalMs()
-
getNetworkIntervalMs
final Long getNetworkIntervalMs()
-
getMinDistanceMeters
final Float getMinDistanceMeters()
-
getUseNetworkProvider
final Boolean getUseNetworkProvider()
-
getProvider
final String getProvider()
Location source flag. "gms" → Google Play Services fused provider (auto-falls back to the platform LocationManager when Play Services is unavailable); any other value → platform LocationManager. Default "gms": the fused provider blends GPS+network+sensors into one de-duplicated, accuracy-aware track, vs the platform path recording every raw GPS and network fix (jittery indoors). Override to "legacy" per-fleet via server config.
-
getBatchMaxDelayMs
final Long getBatchMaxDelayMs()
Max time (ms) location fixes may buffer OS-side before a batched flush (fused path
setMaxUpdateDelayMillis/ platform batched delivery). Lets the AP suspend between flushes while every fix keeps its own capture timestamp. 0 → unbatched delivery.
-
getStallTimeoutMs
final Long getStallTimeoutMs()
Stall watchdog: if no fix arrives for this long while recording, re-register the providers (catches a silently-dead source). 0 → watchdog disabled.
-
getPriority
final String getPriority()
Fused request priority (server-tunable; was hardcoded). One of "high_accuracy" (default, drives GPS hard outdoors), "balanced", "low_power", "passive". Also maps to the platform provider's request quality. Lets a battery-sensitive fleet be dialed down remotely.
-
getWaitForAccurateLocation
final Boolean getWaitForAccurateLocation()
Withhold the first fix until it is accurate. Default false so session/geofence start isn't delayed waiting for a precise fix (a coarse first fix is fine). Fused path only.
-
getGranularity
final String getGranularity()
Location granularity for the fused request: "fine" (default, mirrors ACCESS_FINE_LOCATION), "coarse", or "permission" (whatever the grant allows). Fused path only.
-
getMinUpdateIntervalMs
final Long getMinUpdateIntervalMs()
Fastest accepted update interval (ms) — fused
setMinUpdateIntervalMillis. 0 (default) mirrors gpsIntervalMs for a strict, even cadence; a smaller value lets the OS deliver opportunistically faster than the nominal interval.
-
getFields
final LocationFieldsConfiguration getFields()
Per-field collection controls (S-012).
-
-
-
-