Android
The Battery sensor monitors battery information and monitors power related events (e.g., phone shutting down, rebooting). This sensor provides user-driven contexts, such as initiating a charge and unplugging the device.
Settings
- Battery.STATUS_BATTERY: true or false to activate or deactivate battery usage.
- Battery.ACTION_AWARE_BATTERY_CHANGED: broadcasted when the battery information changes.
- Battery.ACTION_AWARE_BATTERY_CHARGING: broadcasted when the device starts to charge.
- Battery.ACTION_AWARE_BATTERY_CHARGING_AC: broadcasted when the device is charging using the power supply (AC).
- Battery.ACTION_AWARE_BATTERY_CHARGING_USB: broadcasted when the device is charging using USB.
- Battery.ACTION_AWARE_BATTERY_DISCHARGING: broadcasted when the device is unplugged and is running on battery.
- Battery.ACTION_AWARE_BATTERY_FULL: broadcasted when the device has finished charging.
- Battery.ACTION_AWARE_BATTERY_LOW: broadcasted when the device is low on battery (15% or less).
- Battery.ACTION_AWARE_PHONE_SHUTDOWN: broadcasted when the device is about to shutdown.
- Battery.ACTION_AWARE_PHONE_REBOOT: broadcasted when the device is about to reboot.
Battery Data
Contains the battery information.
Battery_Data.CONTENT_URI
content://com.aware.provider.battery/battery
Table field | Field type | Description |
---|---|---|
_id | INTEGER | primary key, auto incremented |
timestamp | REAL | unixtime milliseconds since 1970 |
device_id | TEXT | AWARE device UUID |
battery_status | INTEGER | one of the Android’s battery status, phone shutdown (-1) or rebooted (-2) |
battery_level | INTEGER | the battery level, between 0 and SCALE |
battery_scale | INTEGER | the maximum battery level |
battery_voltage | INTEGER | the current battery voltage |
battery_temperature | INTEGER | the current battery temperature |
battery_adaptor | INTEGER | one of the Android’s battery plugged values |
battery_health | INTEGER | one of the Android’s battery health values |
battery_technology | TEXT | the battery chemical technology (e.g., Li-Ion, etc.) |
Battery Discharges
Contains sessions of the device discharging.
Battery_Discharges.CONTENT_URI
content://com.aware.provider.battery/battery_discharges
Table field | Field type | Description |
---|---|---|
_id | INTEGER | primary key, auto incremented |
timestamp | REAL | unixtime milliseconds since 1970 |
device_id | TEXT | AWARE device UUID |
battery_start | INTEGER | when the device started discharging |
battery_end | INTEGER | when the device stopped discharging |
double_end_timestamp | REAL | time instance of the end of discharge |
Battery Charges
Contains sessions of the device discharging.
Battery_Charges.CONTENT_URI
content://com.aware.provider.battery/battery_charges
Table field | Field type | Description |
---|---|---|
_id | INTEGER | primary key, auto incremented |
timestamp | REAL | unixtime milliseconds since 1970 |
device_id | TEXT | AWARE device UUID |
battery_start | INTEGER | when the device started charging |
battery_end | INTEGER | when the device stopped charging |
double_end_timestamp | REAL | time instance of the end of charge |
iOS
The Battery sensor monitors battery information and monitors power related events. This sensor provides user-driven contexts, such as initiating a charge and unplugging the device.
Settings
- Battery.STATUS_BATTERY: true or false to activate or deactivate battery usage.
- Battery.ACTION_AWARE_BATTERY_CHANGED: broadcasted when the battery information changes.
- Battery.ACTION_AWARE_BATTERY_CHARGING: broadcasted when the device starts to charge.
- Battery.ACTION_AWARE_BATTERY_DISCHARGING: broadcasted when the device is unplugged and is running on battery.
- Battery.ACTION_AWARE_BATTERY_FULL: broadcasted when the device has finished charging.
Battery Data
Contains the battery information.
Table field | Field type | Description |
---|---|---|
_id | INTEGER | primary key, auto incremented |
timestamp | REAL | unixtime milliseconds since 1970 |
device_id | TEXT | AWARE device UUID |
battery_status | INTEGER | 0=unknown, 1=unplegged, 2=charging, 3=full |
battery_level | INTEGER | the battery level, between 0 and SCALE |
battery_scale | INTEGER | the maximum battery level |
battery_voltage | INTEGER | not supported on iOS |
battery_temperature | INTEGER | not supported on iOS |
battery_adaptor | INTEGER | not supported on iOS |
battery_health | INTEGER | not supported on iOS |
battery_technology | TEXT | not supported on iOS |
Battery Discharges
Contains sessions of the device discharging.
Table field | Field type | Description |
---|---|---|
_id | INTEGER | primary key, auto incremented |
timestamp | REAL | unixtime milliseconds since 1970 |
device_id | TEXT | AWARE device UUID |
battery_start | INTEGER | when the device started discharging |
battery_end | INTEGER | when the device stopped discharging |
double_end_timestamp | REAL | time instance of the end of discharge |
Battery Charges
Contains sessions of the device discharging.
Table field | Field type | Description |
---|---|---|
_id | INTEGER | primary key, auto incremented |
timestamp | REAL | unixtime milliseconds since 1970 |
device_id | TEXT | AWARE device UUID |
battery_start | INTEGER | when the device started charging |
battery_end | INTEGER | when the device stopped charging |
double_end_timestamp | REAL | time instance of the end of charge |