BatteryManager
public
class
BatteryManager
extends Object
| java.lang.Object | |
| ↳ | android.os.BatteryManager |
The BatteryManager class contains strings and constants used for values
in the Intent.ACTION_BATTERY_CHANGED Intent, and
provides a method for querying battery and charging properties.
Summary
Constants | |
|---|---|
String |
ACTION_CHARGING
Sent when the device's battery has started charging (or has reached full charge and the device is on power). |
String |
ACTION_DISCHARGING
Sent when the device's battery may be discharging, so apps should avoid doing extraneous work that would cause it to discharge faster. |
int |
BATTERY_CAPACITY_LEVEL_CRITICAL
Battery capacity level is critical. |
int |
BATTERY_CAPACITY_LEVEL_FULL
Battery capacity level is full. |
int |
BATTERY_CAPACITY_LEVEL_HIGH
Battery capacity level is high. |
int |
BATTERY_CAPACITY_LEVEL_LOW
Battery capacity level is low. |
int |
BATTERY_CAPACITY_LEVEL_NORMAL
Battery capacity level is normal. |
int |
BATTERY_CAPACITY_LEVEL_UNKNOWN
Battery capacity level is unknown. |
int |
BATTERY_CAPACITY_LEVEL_UNSUPPORTED
Battery capacity level is unsupported. |
int |
BATTERY_HEALTH_COLD
|
int |
BATTERY_HEALTH_DEAD
|
int |
BATTERY_HEALTH_GOOD
|
int |
BATTERY_HEALTH_OVERHEAT
|
int |
BATTERY_HEALTH_OVER_VOLTAGE
|
int |
BATTERY_HEALTH_UNKNOWN
|
int |
BATTERY_HEALTH_UNSPECIFIED_FAILURE
|
int |
BATTERY_PLUGGED_AC
Power source is an AC charger. |
int |
BATTERY_PLUGGED_DOCK
Power source is dock. |
int |
BATTERY_PLUGGED_USB
Power source is a USB port. |
int |
BATTERY_PLUGGED_WIRELESS
Power source is wireless. |
int |
BATTERY_PROPERTY_CAPACITY
Remaining battery capacity as an integer percentage of total capacity (with no fractional part). |
int |
BATTERY_PROPERTY_CHARGE_COUNTER
Battery capacity in microampere-hours, as an integer. |
int |
BATTERY_PROPERTY_CURRENT_AVERAGE
Average battery current in microamperes, as an integer. |
int |
BATTERY_PROPERTY_CURRENT_NOW
Instantaneous battery current in microamperes, as an integer. |
int |
BATTERY_PROPERTY_ENERGY_COUNTER
Battery remaining energy in nanowatt-hours, as a long integer. |
int |
BATTERY_PROPERTY_STATUS
Battery charge status, from a BATTERY_STATUS_* value. |
int |
BATTERY_STATUS_CHARGING
|
int |
BATTERY_STATUS_DISCHARGING
|
int |
BATTERY_STATUS_FULL
|
int |
BATTERY_STATUS_NOT_CHARGING
|
int |
BATTERY_STATUS_UNKNOWN
|
String |
EXTRA_BATTERY_LOW
Extra for |