The light sensor measures the ambient light. It can be used to detect indoor or outdoor light conditions. The official SensorManager Light constants are:
- Cloudy sky: 100.0
- Full moon: 0.25
- No moon: 0.001
- Overcast: 10000.0
- Shade: 20000.0
- Sunlight: 110000.0
- Sunlight maximum: 120000.0
- Sunrise: 400.0
Settings
- Aware_Preferences.STATUS_LIGHT: true or false to activate or deactivate sensor.
- Aware_Preferences.FREQUENCY_LIGHT: non-deterministic frequency in microseconds (dependent of the hardware sensor capabilities and resources). You can also use a SensorManager sensor delay constant.
- Light.ACTION_AWARE_LIGHT: new data recorded in provider.
- Light.EXTRA_DATA: the recorded data, as ContentValues.
- Light.EXTRA_SENSOR: the sensor information.
- Light.ACTION_AWARE_LIGHT_LABEL: assign label to the recorded data.
- Light.EXTRA_LABEL: the desired label.
Light Sensor
Contains the hardware sensor capabilities in the mobile device.
Light_Sensor.CONTENT_URI
content://com.aware.provider.light/sensor_light
Table field | Field type | Description |
---|---|---|
_id | INTEGER | primary key, auto incremented |
timestamp | REAL | unixtime milliseconds since 1970 |
device_id | TEXT | AWARE device UUID |
double_sensor_maximum_range | REAL | Maximum sensor value possible |
double_sensor_minimum_delay | REAL | Minimum sampling delay in microseconds |
sensor_name | TEXT | Sensor’s name |
double_sensor_power_ma | REAL | Sensor’s power drain in mA |
double_sensor_resolution | REAL | Sensor’s resolution in sensor’s units |
sensor_type | TEXT | Sensor’s type |
sensor_vendor | TEXT | Sensor’s manufacturer |
sensor_version | TEXT | Sensor’s version number |
Light Data
Contains the raw sensor data.
Light_Data.CONTENT_URI
content://com.aware.provider.light/light
Table field | Field type | Description |
---|---|---|
_id | INTEGER | primary key, auto incremented |
timestamp | REAL | unixtime milliseconds since 1970 |
device_id | TEXT | AWARE device UUID |
double_light_lux | REAL | the ambient luminance in lux units |
accuracy | INTEGER | the sensor’s accuracy level – constant from SensorManager |
label | TEXT | researcher/user provided label. Useful for data calibration or labelling |
Light