public abstract class POSTerminal
extends java.lang.Object
This class provides methods to retrieve device instances, check for device existence, and obtain device specifications. It supports a range of devices such as magnetic stripe readers, PIN pads, printers, card readers, fingerprint scanners, and LED indicators.
Usage involves instantiating the class with a relevant Android context and using its methods to interact with the different peripherals of the Smart POS system.
Modifier and Type | Field and Description |
---|---|
protected static android.content.Context |
androidContext |
static java.lang.String |
DEVICE_NAME_ADVANCE_PINPAD |
static java.lang.String |
DEVICE_NAME_CASH_DRAWER |
static java.lang.String |
DEVICE_NAME_EMV |
static java.lang.String |
DEVICE_NAME_FINGERPRINT |
static java.lang.String |
DEVICE_NAME_HSM |
static java.lang.String |
DEVICE_NAME_IDCARD_READER |
static java.lang.String |
DEVICE_NAME_LED |
static java.lang.String |
DEVICE_NAME_MSR |
static java.lang.String |
DEVICE_NAME_PINPAD |
static java.lang.String |
DEVICE_NAME_PRINTER |
static java.lang.String |
DEVICE_NAME_RF_CARD_READER |
static java.lang.String |
DEVICE_NAME_SECONDARY_DISPLAY |
static java.lang.String |
DEVICE_NAME_SERIALPORT |
static java.lang.String |
DEVICE_NAME_SIGNATURE |
static java.lang.String |
DEVICE_NAME_SMARTCARD_READER |
static java.lang.String |
DEVICE_NAME_USBEXTSWITCHDEVICE |
static java.lang.String |
POS_TERMINAL_CLASS
system property
|
static java.lang.String |
POS_TERMINAL_INTERNAL_CLASS |
Constructor and Description |
---|
POSTerminal() |
Modifier and Type | Method and Description |
---|---|
abstract Device |
getDevice(java.lang.String deviceName)
Fetches a device object based on its name.
|
abstract Device |
getDevice(java.lang.String deviceName,
int logicalID)
Retrieves a device object based on its name and a logical ID.
|
abstract DeviceSpec |
getDeviceSpec(java.lang.String deviceName)
Provides the specifications for a specified device.
|
static POSTerminal |
getInstance(android.content.Context context)
Retrieves an instance of the device manager.
|
abstract TerminalSpec |
getTerminalSpec()
Returns the specifications of the terminal.
|
abstract boolean |
isDeviceExist(java.lang.String deviceName)
Checks if a specified device is present.
|
abstract java.lang.String[] |
listDevices()
Lists all available device names.
|
public static final java.lang.String DEVICE_NAME_MSR
public static final java.lang.String DEVICE_NAME_HSM
public static final java.lang.String DEVICE_NAME_RF_CARD_READER
public static final java.lang.String DEVICE_NAME_IDCARD_READER
public static final java.lang.String DEVICE_NAME_PRINTER
public static final java.lang.String DEVICE_NAME_PINPAD
public static final java.lang.String DEVICE_NAME_SMARTCARD_READER
public static final java.lang.String DEVICE_NAME_SERIALPORT
public static final java.lang.String DEVICE_NAME_LED
public static final java.lang.String DEVICE_NAME_CASH_DRAWER
public static final java.lang.String DEVICE_NAME_SECONDARY_DISPLAY
public static final java.lang.String DEVICE_NAME_EMV
public static final java.lang.String DEVICE_NAME_SIGNATURE
public static final java.lang.String DEVICE_NAME_FINGERPRINT
public static final java.lang.String DEVICE_NAME_ADVANCE_PINPAD
public static final java.lang.String DEVICE_NAME_USBEXTSWITCHDEVICE
public static final java.lang.String POS_TERMINAL_CLASS
public static final java.lang.String POS_TERMINAL_INTERNAL_CLASS
protected static android.content.Context androidContext
public static POSTerminal getInstance(android.content.Context context)
context
- the Android contextpublic abstract TerminalSpec getTerminalSpec()
public abstract java.lang.String[] listDevices()
public abstract boolean isDeviceExist(java.lang.String deviceName)
deviceName
- the name of the devicepublic abstract Device getDevice(java.lang.String deviceName)
deviceName
- the name of the devicepublic abstract Device getDevice(java.lang.String deviceName, int logicalID)
For example, when using a SAM (Secure Access Module) card device, the logicalID should be one of the following: 0, 1, 2, or 3, depending on the device type. Similarly, for an LED device, the logicalID corresponds to different colors of the LED, with values 0, 1, 2, or 3.
deviceName
- the name of the device to be retrievedlogicalID
- the logical ID of the device, used to distinguish between multiple devices of the same typepublic abstract DeviceSpec getDeviceSpec(java.lang.String deviceName)
deviceName
- the name of the device