LightSensor
Definition
Physical world component that can measure the light level.
Properties
- Available
- Specifies whether or not the device has the hardware to support the
LightSensor
component. - AverageLux
- Returns the brightness in lux by averaging the previous 10 measured values. The sensor must be enabled and available to return meaningful values.
- Enabled
- Specifies whether the sensor should generate events. If
true
, the sensor will generate events. Otherwise, no events are generated. - Lux
- Returns the last measured brightness in lux. The sensor must be enabled and available to return meaningful values.
- RefreshTime
- The requested minimum time in milliseconds between changes in readings being reported. Android is not guaranteed to honor the request. Setting this property has no effect on pre-Gingerbread devices.