setSensorOverrideEnabled
suspend fun setSensorOverrideEnabled(args: Emulation.SetSensorOverrideEnabledParameter, mode: CommandMode = CommandMode.DEFAULT)
Overrides a platform sensor of a given type. If |enabled| is true, calls to Sensor.start() will use a virtual sensor as backend rather than fetching data from a real hardware sensor. Otherwise, existing virtual sensor-backend Sensor objects will fire an error event and new calls to Sensor.start() will attempt to use a real sensor instead.
suspend fun setSensorOverrideEnabled(enabled: Boolean, type: Emulation.SensorType, metadata: Emulation.SensorMetadata? = null)
Overrides a platform sensor of a given type. If |enabled| is true, calls to Sensor.start() will use a virtual sensor as backend rather than fetching data from a real hardware sensor. Otherwise, existing virtual sensor-backend Sensor objects will fire an error event and new calls to Sensor.start() will attempt to use a real sensor instead.
Parameters
enabled
No description
type
No description
metadata
No description