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

level int
the charge from 0 to 100, or -1 when unknown
state int
one of the STATE_ constants
lowPower boolean
true in low power mode