public class DeviceManager
extends java.lang.Object
getPlatformInfo()
to discover the platform, and pass it in to the instance getter.
Alternatively, you can use the no-parameter version which does the discovery itself.
To get more information about the running environment, you can use the getInventory(Context)
method. Please see the Inventory
class for more information.Modifier and Type | Method and Description |
---|---|
BarCodeReader |
getBarCodeReader()
This method returns the Bar code reader helper for the platform
|
CashDrawer |
getCashDrawer()
This method returns the Cash drawer helper for the platform
|
CashDrawer |
getCashDrawer(int cashDrawerIndex)
This method will return the Cash drawer helper for a specific cash drawer, if more than one is present
|
CFD |
getCfd()
This method returns the Customer Facing Display(CFD) helper for the platform
|
FTDI |
getFTDI()
This method returns the FTDI helper for the platform
|
static DeviceManager |
getInstance(android.content.Context ctx)
Use this factory method to get the deviceManager for current running Platform
|
static DeviceManager |
getInstance(EloPlatform platform,
android.content.Context ctx)
Use this factory method to get the Device Manager instance for a specific platform
|
static Inventory |
getInventory(android.content.Context context)
Return a description of all available devices and capabililties in the current system
|
MotionSensor |
getMotionSensor()
This method will return the Default Motion Sensor for the platform.
|
static ProductInfo |
getPlatformInfo()
This method will return the Product Information structure for the platform.
|
Printer |
getPrinter()
This method returns the default printer for the platform configured
For serial printers, the printer is assumed to be operating at 9600 baud and is connected at
/dev/ttyUSB1
|
Printer |
getPrinter(int baudRate)
This method returns the default printer for the platform configured
The printer is assumed to be operating at baud given by input baudRate and connected at
/dev/ttyUSB1.
|
Printer |
getPrinter(int baudRate,
java.lang.String printerPath)
This method returns the default printer for the platform configured
The printer is assumed to be operating at baud given by input baudRate and connected at
the device of the specified path.
|
Scale |
getScale()
This method will return the Default Weighing Scale for the platform.
|
USB |
getUsb()
This method returns the Default USB helper for the platform.
|
public static DeviceManager getInstance(android.content.Context ctx) throws UnsupportedEloPlatform
ctx
- The Android ContextUnsupportedEloPlatform
public static DeviceManager getInstance(EloPlatform platform, android.content.Context ctx) throws UnsupportedEloPlatform
platform
- The EloPlatform
desiredctx
- The Android Context.UnsupportedEloPlatform
public BarCodeReader getBarCodeReader()
public CashDrawer getCashDrawer()
public CashDrawer getCashDrawer(int cashDrawerIndex) throws UnsupportedPeripheralException
cashDrawerIndex
- The cash drawer number, starting from 1UnsupportedPeripheralException
public CFD getCfd()
public FTDI getFTDI()
public Printer getPrinter()
public Printer getPrinter(int baudRate)
baudRate
- Requested baud ratepublic Printer getPrinter(int baudRate, java.lang.String printerPath)
baudRate
- requested baud rateprinterPath
- path of the printer device, in Linux formatpublic USB getUsb() throws UnsupportedPeripheralException
UnsupportedPeripheralException
public Scale getScale() throws UnsupportedPeripheralException
UnsupportedPeripheralException
public MotionSensor getMotionSensor() throws UnsupportedPeripheralException
UnsupportedPeripheralException
public static ProductInfo getPlatformInfo()