Retrieve the state of charge from a battery information structure.
#include <bps/battery.h>
BPS_API int battery_info_get_state_of_charge(battery_info_t *info)
BlackBerry 10.0.0
The battery_info_t structure to get the state of charge from.
The battery_info_get_state_of_charge() function retrieves the state of charge from a battery_info_t structure. The state of charge is reported as a percentage from 0 to 100.
The state of charging as percentage value, BPS_FAILURE otherwise. Typically, BPS_FAILURE is returned if the battery was not ready.