Battery

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:

Level:
Current battery level, from 0 to Scale. Internally stored as level.

Scale:
Maximum battery level. Internally stored as scale.

Plugged:
Whether the device is plugged or not. It can contain one of the following values:

  • 0 indicating the device is on battery.
  • 1 indicating the current power source is AC.
  • 2 indicating the current power source is USB.
  • 4 indicating the current power source is wireless.

Internally stored as plugged.

Status:
Status of the battery with respect to charging. It can be one of the following values:

  • 1 the battery status is unknown.
  • 2 the battery status is charging.
  • 3 the battery status is discharging.
  • 4 the battery status is not charging.
  • 5 the battery status is full.

Internally stored as status.

Temperature:
Shows the current battery temperature. Internally stored as temperature.

Voltage:
Current battery voltage level. Internally stored as voltage.