Interface BatteryInfo

    • Method Detail

      • getBatteryLevel

        int getBatteryLevel()
        Retrieves the device's current battery charge level, as an integer percentage of full charge.
        Returns:
        current battery charge level
      • isCharging

        boolean isCharging()
        Tells whether the device is currently charging.
        Returns:
        true if the device is charging, false otherwise
      • getBatteryHealth

        @NonNull
        OptionalInt getBatteryHealth()
        Retrieves the device's current battery state of health, as an integer percentage of full health.

        Battery health may be unsupported depending on the drone model and/or firmware versions.
        Hence, clients of this API should call isAvailable method on the returned value to check whether it can be considered valid before use.

        Returns:
        current battery state of health
        See Also:
        OptionalInt