public interface CustomerDisplayDevice extends Device
USBExtSwitchDevice interface provides control over the power state of USB host ports.
This interface allows applications to manage the power on/off state of USB hosts. The USBExtSwitchDevice object is obtained from the POSTerminal:
CustomerDisplayDevice customerDisplayDevice =
(CustomerDisplayDevice) POSTerminal.getInstance().getDevice(POSTerminal.DEVICE_NAME_CUSTOMER_DISPLAY);
The identifier CustomerDisplayDevice is used to specify the device, as defined by the implementation.
Applications require the following permission to access the device:
| Modifier and Type | Method and Description |
|---|---|
boolean |
displayImageOnCustomerScreen(android.graphics.Bitmap image)
Displays a Bitmap image on the customer display device.
|
boolean |
displayImageOnCustomerScreen(byte[] imageData)
Displays a PNG image on the customer display device.
|
android.util.Size |
getSize()
Get the resolution of the customer display.
|
void |
keepImageOnClose(boolean isKeep)
The secondary screen remains on or off when the application exits.
|
void |
keepImageOnSleep(boolean isKeep)
The secondary screen remains on or off when the primary screen turns off.
|
cancelRequest, close, getFailCount, getUsageCount, openboolean displayImageOnCustomerScreen(android.graphics.Bitmap image)
throws DeviceException
This method accepts a Bitmap image of any size and renders it on the customer-facing display starting from the top-left corner. No automatic scaling or cropping is applied. The image should be in PNG format.
image - A Bitmap object representing the image to display.DeviceExceptionboolean displayImageOnCustomerScreen(byte[] imageData)
throws DeviceException
This method sends a PNG image to the customer-facing display. The image will be rendered starting from the top-left corner of the display, without scaling or cropping. The image should be in PNG format.
imageData - A byte array containing the PNG image data.DeviceExceptionandroid.util.Size getSize()
throws DeviceException
DeviceException - if the call fails.void keepImageOnClose(boolean isKeep)
throws DeviceException
isKeep - true,Set the custom screen to stay on after the application exits.otherwise set to false.
If the setting fails, a DeviceException is thrown.
DeviceExceptionvoid keepImageOnSleep(boolean isKeep)
throws DeviceException
isKeep - true,Set the custom screen to stay on after sleep.otherwise set to false.
If the setting fails, a DeviceException is thrown.
DeviceException