Interface Battery.Listener

Enclosing class:
Battery

public static interface Battery.Listener
Notified when the battery level, state or low power mode changes.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    batteryChanged(int level, int state, boolean lowPower)
    Called on the EDT after a change.
  • Method Details

    • batteryChanged

      void batteryChanged(int level, int state, boolean lowPower)

      Called on the EDT after a change.

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