LightProbe
Collects ambient light from the phone's light sensor, typically located near the front camera.
Buffers lux readings over each sampling period and reports their statistics as an AmbientLight object.
This probe is only available on Android.
- Inheritance
Constructors
LightProbe
Properties
bufferingStream
The stream of events to buffer. Implemented by subclasses.
Methods
getMeasurement
Returns the Measurement for the last sampling window.
Implemented by subclasses.
Can return null if no data is available. Can return an Error if an error occurs.
onInitialize
Called by initialize. Returns true if successfully initialized.
If false, the executor stays in ExecutorState.Created. This is a synchronous method and must be light-weight.
onSamplingData
- dynamic event
Called for each event on bufferingStream; buffers it.
onSamplingEnd
Called when a sampling window ends, before getMeasurement.
onSamplingStart
Called when a sampling window starts, before listening.