public static interface Battery.OnHealthListener
Battery.setHealthLowLevel(int),
Battery.setHealthOkLevel(int)| Modifier and Type | Method and Description |
|---|---|
void |
onHealthLow(android.content.Context context,
Battery battery)
Invoked whenever the current strength of the battery changes from the OK level to
the LOW.
|
void |
onHealthOk(android.content.Context context,
Battery battery)
Invoked whenever the current strength of the battery changes from the LOW level to
the OK level.
|
void onHealthOk(android.content.Context context,
Battery battery)
Battery.getHealth().
Note, that there need to be registered BatteryHealthReceiver via
Battery.registerBatteryReceiver(Context, int) with Battery.RECEIVER_BATTERY_HEALTH to
receive this callback.
context - Current application context.battery - Battery with the actual data.void onHealthLow(android.content.Context context,
Battery battery)
Battery.getHealth().
Note, that there need to be registered BatteryHealthReceiver via
Battery.registerBatteryReceiver(Context, int) with Battery.RECEIVER_BATTERY_HEALTH to
receive this callback.
context - Current application context.battery - Battery with the actual data.