Class BluetoothBattery


  • public class BluetoothBattery
    extends AbstractBluetoothObject
    Wrapper class which represents the battery of a remote bluetooth device.
    • Constructor Detail

      • BluetoothBattery

        public BluetoothBattery​(Battery1 _battery,
                                BluetoothDevice _device,
                                String _dbusPath,
                                org.freedesktop.dbus.connections.impl.DBusConnection _dbusConnection)
    • Method Detail

      • getInterfaceClass

        protected Class<? extends org.freedesktop.dbus.interfaces.DBusInterface> getInterfaceClass()
        DBus-Interface class used in this wrapper object.
        Specified by:
        getInterfaceClass in class AbstractBluetoothObject
        Returns:
        class which implements the interface
      • getPercentage

        public Byte getPercentage()
        From bluez Documentation:

        The percentage of battery left as an unsigned 8-bit integer.

        Returns:
        byte, maybe null