Class AndroidBatteryService

java.lang.Object
com.gluonhq.attach.battery.impl.AndroidBatteryService
All Implemented Interfaces:
BatteryService

public class AndroidBatteryService extends Object implements BatteryService
  • Property Summary

    Properties
    Type
    Property
    Description
    javafx.beans.property.ReadOnlyFloatProperty
    Returns a property that will be frequently updated to reflect the current battery level.
    javafx.beans.property.ReadOnlyBooleanProperty
    Returns a property that will be updated to reflect whether the device is plugged in to an external power source or not.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.beans.property.ReadOnlyFloatProperty
    Returns a property that will be frequently updated to reflect the current battery level.
    float
    Gets the value of the batteryLevel property.
    boolean
    Gets the value of the pluggedIn property.
    javafx.beans.property.ReadOnlyBooleanProperty
    Returns a property that will be updated to reflect whether the device is plugged in to an external power source or not.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Property Details

  • Constructor Details

    • AndroidBatteryService

      public AndroidBatteryService()
  • Method Details

    • getBatteryLevel

      public float getBatteryLevel()
      Gets the value of the batteryLevel property.
      Specified by:
      getBatteryLevel in interface BatteryService
      Property description:
      Returns:
      the value of the batteryLevel property
      See Also:
    • batteryLevelProperty

      public javafx.beans.property.ReadOnlyFloatProperty batteryLevelProperty()
      Description copied from interface: BatteryService
      Returns a property that will be frequently updated to reflect the current battery level.
      Specified by:
      batteryLevelProperty in interface BatteryService
      Returns:
      the batteryLevel property
      See Also:
    • isPluggedIn

      public boolean isPluggedIn()
      Gets the value of the pluggedIn property.
      Specified by:
      isPluggedIn in interface BatteryService
      Property description:
      Returns:
      the value of the pluggedIn property
      See Also:
    • pluggedInProperty

      public javafx.beans.property.ReadOnlyBooleanProperty pluggedInProperty()
      Description copied from interface: BatteryService
      Returns a property that will be updated to reflect whether the device is plugged in to an external power source or not.
      Specified by:
      pluggedInProperty in interface BatteryService
      Returns:
      the pluggedIn property
      See Also: