CustomAndroidAPI  1.05
 All Classes Namespaces Functions Variables Pages
it.custom.printer.api.android.CustomAndroidAPI Class Reference

Public Member Functions

CustomPrinter getPrinterDriverBT (BluetoothDevice printer) throws CustomException
 
CustomPrinter getPrinterDriverETH (String printerIpAddr) throws CustomException
 
CustomPrinter getPrinterDriverETH (String printerIpAddr, int printerIpPort) throws CustomException
 
CustomPrinter getPrinterDriverCOM (String devPort) throws CustomException
 
CustomPrinter getPrinterDriverUSB (UsbDevice device, Context cobj) throws CustomException
 

Static Public Member Functions

static String getAPIVersion ()
 
static void EnableLogAPI (boolean enable)
 
static BluetoothDevice[] EnumBluetoothDevices () throws CustomException
 
static String[] EnumEthernetDevices (int searchTimeout, Context cobj) throws CustomException
 
static UsbDevice[] EnumUsbDevices (Context cobj) throws CustomException
 

Detailed Description

Factory class to get the printer driver class for supported model id

Member Function Documentation

static void it.custom.printer.api.android.CustomAndroidAPI.EnableLogAPI ( boolean  enable)
inlinestatic

Enable / disable the API log (default disabled).

static BluetoothDevice [] it.custom.printer.api.android.CustomAndroidAPI.EnumBluetoothDevices ( ) throws CustomException
inlinestatic

Get the list of CUSTOM Bluetooth devices.

Returns
the list of CUSTOM Bluetooth devices
Exceptions
CustomExceptionif Bluetooth is not enable or is not supported
static String [] it.custom.printer.api.android.CustomAndroidAPI.EnumEthernetDevices ( int  searchTimeout,
Context  cobj 
) throws CustomException
inlinestatic

Get the list of CUSTOM Ethernet devices.

Parameters
searchTimeoutSearch Ethernet devices timeout
cobjContext object
Returns
the String list with IP ADDRESS of CUSTOM Ethernet devices
Exceptions
CustomException
static UsbDevice [] it.custom.printer.api.android.CustomAndroidAPI.EnumUsbDevices ( Context  cobj) throws CustomException
inlinestatic

Get the list of CUSTOM USB Printer devices.

Parameters
cobjContext object
Returns
the String list CUSTOM USB devices
Exceptions
CustomException
static String it.custom.printer.api.android.CustomAndroidAPI.getAPIVersion ( )
inlinestatic

Current API version

Returns
current API version eg 1.00
Exceptions
CustomException
CustomPrinter it.custom.printer.api.android.CustomAndroidAPI.getPrinterDriverBT ( BluetoothDevice  printer) throws CustomException
inline

Connects to Bluetooth Printer device returns printer driver class.

Parameters
printerdevice to connect
Returns
printer driver class according to its model/printer id
Exceptions
CustomExceptionif Bluetooth device is not printer or printer model is not supported
CustomPrinter it.custom.printer.api.android.CustomAndroidAPI.getPrinterDriverCOM ( String  devPort) throws CustomException
inline

Connects to Com/Serial Printer device returns printer driver class.

Parameters
devPortString value with dev address of device to connect (the dev must be set with "666" permissions. Example: "chmod 666 /dev/ttyS0")
Returns
printer driver class according to its model/printer id
Exceptions
CustomExceptionif open port port error, device is not printer or printer model is not supported
CustomPrinter it.custom.printer.api.android.CustomAndroidAPI.getPrinterDriverETH ( String  printerIpAddr) throws CustomException
inline

Connects to WiFi/Ethernet Printer device returns printer driver class.

Parameters
printerIpAddrString value with IP ADDRESS of device to connect (connect of prn port 9100)
Returns
printer driver class according to its model/printer id
Exceptions
CustomExceptionif WiFi/Ethernet device is not printer or printer model is not supported
CustomPrinter it.custom.printer.api.android.CustomAndroidAPI.getPrinterDriverETH ( String  printerIpAddr,
int  printerIpPort 
) throws CustomException
inline

Connects to WiFi/Ethernet Printer device returns printer driver class.

Parameters
printerIpAddrString value with IP ADDRESS of device to connect
printerIpPortinteger value with IP PORT of device to connect
Returns
printer driver class according to its model/printer id
Exceptions
CustomExceptionif WiFi/Ethernet device is not printer or printer model is not supported
CustomPrinter it.custom.printer.api.android.CustomAndroidAPI.getPrinterDriverUSB ( UsbDevice  device,
Context  cobj 
) throws CustomException
inline

Connects to Usb Printer device returns printer driver class.

Parameters
deviceUSB object of device to connect
cobjContext object
Returns
printer driver class according to its model/printer id
Exceptions
CustomExceptionif USB device is not printer or printer model is not supported