Supported in Android & iOS.
This data source monitors the battery status of the device. The battery data source has three unique features:
- Unlike other data sources which can be unavailable on certain devices (e.g. smartphones without accelerometer), almost all devices are shipped with batteries. That guarantees that regardless of device type, this data will be available.
- Unlike some data sources such as GPS where the user can turn off the sensor manually, the battery data source cannot be turned off.
- Ethica guarantees that in each operation cycle, it reads exactly one battery record.
These features allow us to infer certain information from battery data. First and foremost, battery data provide information on charging, discharging, and power consumption of the device. This allows us to measure how fast the battery drains, and how often the participant has to charge their device.
Additionally, as Ethica guarantees exactly one battery record per operation cycle, this data can clearly show for how long the app was operational and how long it was not, for reasons such as the device being turned off or the app is stopped explicitly.
Furthermore, the battery data can be combined with data from other sources to assist behavioral analysis. For example, if the phone is plugged to the wall, we can be almost certain that the person was not carrying the device, and therefore any activity readings during that period should be treated with caution.
Each battery record includes the following:
Current battery level, from 0 to Scale. Internally stored as
Maximum battery level. Internally stored as
Whether the device is plugged or not. It can contain one of the following values:
0indicating the device is on battery.
1indicating the current power source is AC.
2indicating the current power source is USB.
4indicating the current power source is wireless.
Internally stored as
Status of the battery with respect to charging. It can be one of the following values:
1the battery status is unknown.
2the battery status is charging.
3the battery status is discharging.
4the battery status is not charging.
5the battery status is full.
Internally stored as
Shows the current battery temperature. Internally stored as
Current battery voltage level. Internally stored as