public interface CashDrawerDevice extends Device
The cash drawer device object is obtained from the POSTerminal
, its' as follows:
CashDrawerDevice cashDrawerDevice = (CashDrawerDevice) POSTerminal.getInstance().getDevice("com.cloudpos.device.cashdrawer");Among them, the "com.cloudpos.device.cashdrawer" string is to identify the cash drawer device, defined by the specific implementation.
Uses the cash drawer device object to control the operation of the cash drawer device.
An app can request permission to access the device, as shown below:
<uses-permission android:name="android.permission.CLOUDPOS_MONEYBOX" />
Device
Modifier and Type | Method and Description |
---|---|
void |
kickOut()
Kicks out the cash drawer.
|
void |
open(int logicalID)
Opens the cash drawer for use.
|
int |
queryStatus()
Gets the status of the cash drawer.
|
cancelRequest, close, getFailCount, getUsageCount, open
void open(int logicalID) throws DeviceException
logicalID
- logical ID of the cash drawer to open.DeviceException
- for the standard reasons that are documented in DeviceException
.void kickOut() throws DeviceException
DeviceException
- for the standard reasons that are documented in DeviceException
.int queryStatus() throws DeviceException
0
opened. 1
closed. -1
unknow.DeviceException
- for the standard reasons that are documented in DeviceException
.