Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public interface Battery.Listener
Notified when the battery level, state or low power mode changes.
Methods
public abstract void batteryChanged(int level, int state, boolean lowPower) | Called on the EDT after a change. |
Method details
batteryChanged
public abstract void batteryChanged(int level, int state, boolean lowPower)Called on the EDT after a change.
Parameters
levelint- the charge from 0 to 100, or -1 when unknown
stateint- one of the
STATE_constants lowPowerboolean- true in low power mode