public static final class DeviceApi.Device.State extends Object
| Modifier and Type | Method and Description | 
|---|---|
static Optional<Integer> | 
getBatteryState()
Gets the battery state. 
 | 
static Optional<Integer> | 
getBrightness()
Gets the brightness. 
 | 
static Optional<Integer> | 
getFreeRam()
Gets the free RAM. 
 | 
static Optional<DeviceApi.Device.Mode> | 
getMode()
Gets the mode. 
 | 
static Optional<Integer> | 
getOpenState()
Gets the open state. 
 | 
static Optional<DeviceApi.Device.Orientation> | 
getOrientation()
Gets the display orientation. 
 | 
static boolean | 
setBrightness(int brightness)
Sets the brightness 
 | 
static boolean | 
setOrientation(DeviceApi.Device.Orientation orientation)
Sets the display orientation. 
 | 
public static Optional<DeviceApi.Device.Mode> getMode()
public static Optional<DeviceApi.Device.Orientation> getOrientation()
public static boolean setOrientation(DeviceApi.Device.Orientation orientation)
orientation - The orientation.public static Optional<Integer> getBatteryState()
public static Optional<Integer> getOpenState()
public static Optional<Integer> getBrightness()
public static boolean setBrightness(int brightness)
brightness - A percentage.Copyright © 2025. All rights reserved.