Package: android.frameworks.sensorservice@1.0

IEventQueue

interface IEventQueue

An IEventQueue is an interface to manage an event queue created by ISensorManager.

Methods

enableSensor

enableSensor (int32_t sensorHandle, int32_t samplingPeriodUs, int64_t maxBatchReportLatencyUs)
generates (Result result)

Enable the selected sensor with a specified sampling period and max batch report latency.If enableSensor is called multiple times on the same sensor, the previous calls must be overridden by the last call.

Details
Parameters
sensorHandle
the sensor to enable.Must be a sensor acquired from the ISensorManager that creates this IEventQueue.
samplingPeriodUs
sampling period in microseconds.
maxBatchReportLatencyUs
max batch report latency in microseconds.
Generates
result
OK if successful, or PERMISSION_DENIED, BAD_VALUE, INVALID_OPERATION, NO_INIT for errors.

disableSensor

disableSensor (int32_t sensorHandle)
generates (Result result)

Disable the selected sensor.

Details
Parameters
sensorHandle
the sensor to disable.Must be a sensor acquired from the ISensorManager that creates this IEventQueue.
Generates
result
OK if successful, BAD_VALUE or NO_INIT for errors.