Display
Control the screen: brightness, orientation, backlight, HDMI output, and capturing the screen.
Brightness
public static void setScreenBrightness(Context context, String value) // "0" - "255"
ItempApiPub.setScreenBrightness(context, "200");
"0" is the dimmest the panel allows (not necessarily off — use the backlight
control to blank it).
Backlight on/off
public static void setBacklightEnable(Context context, boolean enable)
ItempApiPub.setBacklightEnable(context, false); // panel dark, board still running
Useful for blanking a display outside opening hours without sleeping the whole board.
Orientation
Two ways to rotate. setScreenOrientation sets an absolute angle:
public static void setScreenOrientation(Context context, String orientation)
// "0" | "90" | "180" | "270"
ItempApiPub.setScreenOrientation(context, "90"); // portrait
screenRotation steps the rotation by one position each call:
public static void screenRotation(Context context) // rotate by one step
For fixed-install signage, use setScreenOrientation with an absolute angle.
Reserve screenRotation for interactive "rotate" buttons.
HDMI output
public static void setHDMIoutEnable(Context context, boolean enable)
ItempApiPub.setHDMIoutEnable(context, true);
Screenshot
public static void screenShot(Context context)
Captures the current screen to the device's default screenshot location. There is no return value and no path argument — retrieve the file through the normal Android storage APIs afterwards.
Notes
Brightness is a string "0"-"255". An int will not compile; a value over
255 is ignored.
Absolute vs stepped rotation. Mixing setScreenOrientation and
screenRotation in the same app makes the current angle hard to track. Pick one
model per app.
Backlight off is not sleep. The board keeps running, the network stays up, schedules still fire. It only blanks the panel.
Related
- Power and schedule — sleep the whole board instead
- Board pages — which display outputs each board has