public class Inventory
extends java.lang.Object
DeviceManager
, and obtain an Inventory object. The
object is initialized with the current platform information, and immediately discovers all of the
attached peripherals. If a configuration change is later detected, you can call the collect()
method to collect the inventory again.
Once you have the Inventory, you can query it to find out which peripherals are attached, and
what their specific capabilities are. In a few cases, the same peripheral on different platforms
may have slightly different capabilities; these are reflected in the query results.
Note that the Inventory only provides the capabilities of the peripherals and not the actual
configuration. The queries return static information based on the result of collecting the
peripherals. If you want to know about the current configuration or state of a peripheral,
you need to call one of the DeviceManager
's peripheral helpers to get that information.Constructor and Description |
---|
Inventory(android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
boolean |
barCodeReaderCanSetKeyboardMode()
Does the barcode reader support setting USB Keyboard Mode from Virtual COM Mode?
|
BcrEnableControl |
barCodeReaderEnableControl()
Describes what kind of control the host has over enabling and disabling the barcode reader.
|
boolean |
barCodeReaderSupports2d()
Does the barcode reader support 2-D barcodes (e.g.
|
boolean |
barCodeReaderSupportsKeyboardMode()
Does the barcode reader support USB Keyboard Mode?
|
boolean |
barCodeReaderSupportsVComMode()
Does the barcode reader support USB Virtual COM Mode?
|
void |
collect()
Collect the inventory of the system.
|
BcrSupported |
getBcrDeviceType()
Get the type (make, model) of the Barcode Reader
The return value is a
BcrSupported , which is an enum that lists the supported makes
of Barcode Reader. |
CfdSupported |
getCfdDeviceType()
Get the type (make, model) of the CFD
The return value is a
CfdSupported , which is an enum that lists the supported makes
of CFD. |
MsrSupported |
getMsrDeviceType()
Get the type (make, model) of the Magnetic Stripe Reader.
|
int |
getNumCashDrawers()
Get the number of cash drawers supported.
|
ConnectionType |
getPrinterConnectionType()
Return the
ConnectionType the printer uses with the host |
PrinterSupported |
getPrinterDeviceType()
Get the type (make, model) of the printer
The return value is a
PrinterSupported , which is an enum that lists the supported makes
of printer. |
ProductInfo |
getProductInfo()
Retrieve the product info for the running platform
|
boolean |
hasBarCodeReader()
Does the platform have a barcode reader?
|
boolean |
hasCashDrawer()
Does the platform have a cash drawer?
Note that in many cases, the cash drawer is connected via the printer.
|
boolean |
hasCfd()
Does the platform have a CFD device?
|
boolean |
hasFtdi()
Determines whether or not an FTDi device is connected.
|
boolean |
hasMsr()
Does the platform have an MSR device?
|
boolean |
hasPrinter()
Does the platform have an printer attached?
|
boolean |
isCashDrawerBuiltIn()
Is the cash drawer built-in to the system, or external?
|
boolean |
isCashDrawerOpenSenseSettable()
The open sensor for some cash drawers reads open on high voltage; others read open on low.
|
boolean |
isCashDrawerStateReadable()
Can the open/close state of the cash drawer be read?
|
boolean |
isEloSdkSupported()
Determine if platform supports the Elo SDK.
|
boolean |
isPrinterChineseModeSupported()
Does the printer have native Chinese mode support? If so, the
Printer.setChineseMode(boolean)
method can be used to change the mode |
boolean |
isPrinterPaperOutSupported()
Can the printer detect whether it's out of paper?
|
public boolean isEloSdkSupported()
public ProductInfo getProductInfo()
public void collect()
public boolean hasMsr()
public MsrSupported getMsrDeviceType()
MsrSupported
, which is an enum that lists the supported makes
of MSR.public boolean hasBarCodeReader()
public BcrSupported getBcrDeviceType()
BcrSupported
, which is an enum that lists the supported makes
of Barcode Reader.public boolean barCodeReaderSupports2d()
public boolean barCodeReaderSupportsKeyboardMode()
public boolean barCodeReaderSupportsVComMode()
public boolean barCodeReaderCanSetKeyboardMode()
public BcrEnableControl barCodeReaderEnableControl()
BcrEnableControl
for a description of the different control availablepublic boolean hasCashDrawer()
public int getNumCashDrawers()
public boolean isCashDrawerOpenSenseSettable()
public boolean isCashDrawerStateReadable()
public boolean isCashDrawerBuiltIn()
public boolean hasPrinter()
public PrinterSupported getPrinterDeviceType()
PrinterSupported
, which is an enum that lists the supported makes
of printer.public ConnectionType getPrinterConnectionType()
ConnectionType
the printer uses with the hostConnectionType
, or null if there's no printerpublic boolean isPrinterChineseModeSupported()
Printer.setChineseMode(boolean)
method can be used to change the modepublic boolean isPrinterPaperOutSupported()
public boolean hasCfd()
public CfdSupported getCfdDeviceType()
CfdSupported
, which is an enum that lists the supported makes
of CFD. Note that we currently only detect the two-line CFD integrated into PayPoint
platforms. An external display, connected to an I-Series, is not detected.public boolean hasFtdi()