public final class BatteryState


Information about the battery state of the projected device.

Summary

Public constructors

BatteryState(
    boolean isCharging,
    @IntRange(from = 0, to = 100) int batteryLevel
)

Public methods

boolean
equals(Object other)
final int

the current battery level, from 0 to 100 inclusive

int
final boolean

true if the battery is currently charging, false otherwise

Public constructors

BatteryState

Added in 1.0.0-alpha14
public BatteryState(
    boolean isCharging,
    @IntRange(from = 0, to = 100) int batteryLevel
)

Public methods

equals

public boolean equals(Object other)

getBatteryLevel

Added in 1.0.0-alpha14
public final int getBatteryLevel()

the current battery level, from 0 to 100 inclusive

hashCode

public int hashCode()

isCharging

Added in 1.0.0-alpha14
public final boolean isCharging()

true if the battery is currently charging, false otherwise