The temperature sensor measures the ambient air temperature, in Celsius (˚C). Not many devices have this sensor available.
Public functions
- Temperature.getFrequency( Context context ): returns the sampling rate in Hz.
Settings
- Aware_Preferences.STATUS_TEMPERATURE: true or false to activate or deactivate sensor.
- Aware_Preferences.FREQUENCY_TEMPERATURE: non-deterministic frequency in microseconds (dependent of the hardware sensor capabilities and resources), e.g., 200000 (normal), 60000 (UI), 20000 (game), 0 (fastest).
- Temperature.ACTION_AWARE_TEMPERATURE: new data recorded in provider.
- Temperature.EXTRA_DATA: the recorded data, as ContentValues.
- Temperature.ACTION_AWARE_TEMPERATURE_LABEL: assign label to the recorded data.
- Temperature.EXTRA_LABEL: the desired label.
Temperature Sensor
Contains the hardware sensor capabilities in the mobile device.
Temperature_Sensor.CONTENT_URI
content://com.aware.provider.temperature/sensor_temperature
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 |
Temperature Data
Contains the raw sensor data.
Temperature_Data.CONTENT_URI
content://com.aware.provider.temperature/temperature
Table field | Field type | Description |
---|---|---|
_id | INTEGER | primary key, auto incremented |
timestamp | REAL | unixtime milliseconds since 1970 |
device_id | TEXT | AWARE device UUID |
temperature_celsius | REAL | measured temperature |
accuracy | INTEGER | Sensor’s accuracy level (see SensorManager) |
label | TEXT | Customizable label. Useful for data calibration or traceability |
Temperature