Package 

Class MotionConfiguration

    • Method Detail

      • getSamplingHz

         final Double getSamplingHz()

        Sensor collection rate (Hz). Accepts the canonical key collectionRateHz, the previous canonical collect, and the legacy hz for parity with iOS; also accepts the existing Android key samplingHz. Tried in priority order by kotlinx.serialization (Json must have useAlternativeNames).

      • getFields

         final Map<String, Boolean> getFields()

        Single per-stream on/off map. Each key matches the wire-format stream name 1:1 — accel, gyroscope, magneticField, rotationVector, gameRotationVector, gravity, proximity, stepCounter, pressure, etc. — so the config map and the JSON data.<stream> object align directly. The map decides whether the underlying Sensor.TYPE_* listener is registered at all — MotionFieldPolicy.want<Sensor> returns true when the stream's key is true (or missing). When false, the listener never starts and the dedicated stream stays silent.

        Each sensor emits its own stream at its own native cadence (with its own sensorTimestamp); there is no fused / interpolated row, so streams are all-or-nothing (no per-axis suppression).

        Omitted / null means "every stream enabled" (backward compatible). Only an explicit false disables a stream. Accepts collectedFields as an alias so older server responses keep working unchanged through the rename.

      • getUseRateReducer

         final Boolean getUseRateReducer()

        Server controls whether decimation is active. Mirrors iOS MotionConfiguration.useRateReducer. Defaults to false so older server builds keep the legacy "no rate reducer" behavior.

      • getRateReducerOutputHz

         final Double getRateReducerOutputHz()

        Target output rate (Hz) for the rate reducer when useRateReducer == true. Null falls back to samplingHz (no reduction).