List of ePOS SDK API

Epson ePOS SDK for Android provides the following classes:

Note:

Printer class


Controls printing by the printer.

API

Description

Initialization

Printer

Initializes the Printer class.

Communication path

connect

Connects to the printer.

disconnect

Disconnects from the printer.

Status monitor

startMonitor

Enables status event notification.

stopMonitor

Disables status event notification.

Status acquisition

getStatus

Acquires status of the connected printer.

Transmission

sendData

Sends a command to the printer.

Transaction

beginTransaction

Starts a transaction.

endTransaction

Ends a transaction.

Print job

requestPrintJobStatus

Acquires the print result.

Buffer clear

clearCommandBuffer

Clears the command buffer.

Text

addTextAlign

Adds text alignment setting to the command buffer.

addLineSpace

Adds line spacing setting to the command buffer.

addTextRotate

Adds text rotation setting to the command buffer.

addText

Adds text to print to the command buffer.

addTextLang

Adds language setting to the command buffer.

addTextFont

Adds character font setting to the command buffer.

addTextSmooth

Adds character smoothing setting to the command buffer.

addTextSize

Adds character scaling factor setting to the command buffer.

addTextStyle

Adds character style setting to the command buffer.

addHPosition

Adds character print position setting to the command buffer.

Paper feed

addFeedUnit

Adds paper-feed setting in dots to the command buffer.

addFeedLine

Adds paper-feed setting in lines to the command buffer.

Graphics

addImage

Adds a raster image print command to the command buffer.

addLogo

Adds a NV logo print command to the command buffer.

Barcode

addBarcode

Adds a barcode print command to the command buffer.

addSymbol

Adds a 2D symbol print command to the command buffer.

Ruled line

addHLine

Adds a horizontal ruled line print command to the command buffer.

addVLineBegin

Adds a vertical ruled line start command to the command buffer.

addVLineEnd

Adds a vertical ruled line end command to the command buffer.

Page mode

addPageBegin

Adds a page mode start command to the command buffer.

addPageEnd

Adds a page mode end command to the command buffer.

addPageArea

Adds page mode print area setting to the command buffer.

addPageDirection

Adds page mode print direction setting to the command buffer.

addPagePosition

Adds page mode print position setting to the command buffer.

addPageLine

Adds a page mode line draw command to the command buffer.

addPageRectangle

Adds a page mode rectangle draw command to the command buffer.

Batch rotate print

addRotateBegin

Adds the start batch rotate print mode to the command buffer.

addRotateEnd

Adds the end batch rotate print mode to the command buffer.

Cut

addCut

Adds a sheet cut command to the command buffer.

Drawer

addPulse

Adds a drawer kick command to the command buffer.

Buzzer

addSound

Adds a buzzer sound command to the command buffer.

Label sheet/
black mark sheet

addFeedPosition

Adds a paper feed command to the command buffer.

addLayout

Adds sheet layout setting to the command buffer.

Command

addCommand

Adds a command to the command buffer.

Maintenance counter

getMaintenanceCounter

Acquires the counter value.

resetMaintenanceCounter

Resets the counter value.

Printer setting

getPrinterSetting

Acquires the set value of the printer setting.

setPrinterSetting

Changes the printer setting.

getPrinterSettingEx

Acquires the set value of the printer setting in JSON.

setPrinterSettingEx

Specifies the printer setting in JSON.

setPrinterSettingEx[Obsolete]

verifyPassword

Check the printer administrator password.

Information acquisition

getPrinterInformation

Acquires the printer information.

Firmware update

downloadFirmwareList

Acquires the list of the firmware.

getPrinterFirmwareInfo

Acquires the information of the printer firmware.

verifyUpdate

Acquires the result of the firmware update.

updateFirmware

Instructs the printer to write the firmware image.

Forced transmission

forceRecover

Forced transmission function

forcePulse

forceStopSound

forceCommand

forceReset

Reception of result

setStatusChangeEventListener

Registers the event listener method.

setReceiveEventListener

setGetPrinterSettingExListener

setSetPrinterSettingExListener

setVerifyPasswordListener

Monitor interval

interval

<Obsolete> Status monitor interval

The print mode includes the standard mode, page mode, and the batch rotate print mode.

  • Standard mode
  • Prints line by line. Line spacing is automatically adjusted according to character size, image size, and barcode height. Suitable for printing receipts whose print length varies by print content.

  • Page mode
  • Prints page by page. Prints characters, images, and/or barcodes on a single page that is defined as a print area.
    To print in the page mode, use addPageBegin and addPageEnd to start and end the page mode process, respectively.

  • Batch rotate print mode
  • This is a print mode in which the range of the print data (such as characters, images, barcodes, etc.) is set, the print data in the set range is compiled, inverted, and then printed.
    When performing the processing in the batch rotate print mode, start the batch rotate print processing with addRotateBegin, and end the batch rotate print processing with addRotateEnd.

The APIs that can be used in each mode are described in the table below.

API

Standard mode

Page mode

Batch rotate
print mode

Printer

-

-

-

connect

-

-

-

disconnect

-

-

-

startMonitor

stopMonitor

getStatus

sendData

-

beginTransaction

endTransaction

-

requestPrintJobStatus

clearCommandBuffer

-

addTextAlign

-

addLineSpace

addTextRotate

-

addText

addTextLang

addTextFont

addTextSmooth

addTextSize

addTextStyle

addHPosition

addFeedUnit

addFeedLine

addImage

addLogo

addBarcode

addSymbol

addHLine

-

addVLineBegin

-

addVLineEnd

-

addPageBegin

-

-

addPageEnd

-

-

addPageArea

-

-

addPageDirection

-

-

addPagePosition

-

-

addPageLine

-

-

addPageRectangle

-

-

addRotateBegin

-

-

addRotateEnd

-

-

addCut

-

-

addPulse

-

-

addSound

-

-

addFeedPosition

-

addLayout

-

addCommand

LFCPrinter class


Controls printing by the printer.

This is beneficial when multiple smart devices are used for a single printer with the waiting for paper removal function.

API

Description

Initialization

LFCPrinter

Initializes the LFCPrinter class.

Communication path

connect

Connects to the printer.

disconnect

Disconnects from the printer.

Status monitor

startMonitor

Enables status event notification.

stopMonitor

Disables status event notification.

Status acquisition

getStatus

Acquires status of the connected printer.

Transmission

sendLFCData

Sends a command to the printer.

Reception of result

setStatusChangeEventListener

Registers the event listener method.

setSendCompleteEventListener

setPrintCompleteEventListener

Creating print document by the LFCPrinter class

The LFCPrinter class creates a print document using the same API as the Printer class.

The APIs available for the LFCPrinter class are listed below.

API

Description

Text

addTextAlign

Adds text alignment setting to the command buffer.

addLineSpace

Adds line spacing setting to the command buffer.

addTextRotate

Adds text rotation setting to the command buffer.

addText

Adds text to print to the command buffer.

addTextLang

Adds language setting to the command buffer.

addTextFont

Adds character font setting to the command buffer.

addTextSmooth

Adds character smoothing setting to the command buffer.

addTextSize

Adds character scaling factor setting to the command buffer.

addTextStyle

Adds character style setting to the command buffer.

addHPosition

Adds character print position setting to the command buffer.

Paper feed

addFeedUnit

Adds paper-feed setting in dots to the command buffer.

addFeedLine

Adds paper-feed setting in lines to the command buffer.

Graphics

addImage

Adds a raster image print command to the command buffer.

addLogo

Adds a NV logo print command to the command buffer.

Barcode

addBarcode

Adds a barcode print command to the command buffer.

addSymbol

Adds a 2D symbol print command to the command buffer.

Page mode

addPageBegin

Adds a page mode start command to the command buffer.

addPageEnd

Adds a page mode end command to the command buffer.

addPageArea

Adds page mode print area setting to the command buffer.

addPageDirection

Adds page mode print direction setting to the command buffer.

addPagePosition

Adds page mode print position setting to the command buffer.

addPageLine

Adds a page mode line draw command to the command buffer.

addPageRectangle

Adds a page mode rectangle draw command to the command buffer.

Batch rotate print

addRotateBegin

Adds the start batch rotate print mode to the command buffer.

addRotateEnd

Adds the end batch rotate print mode to the command buffer.

Cut

addCut

Adds a sheet cut command to the command buffer.

Drawer

addPulse

Adds a drawer kick command to the command buffer.

Buzzer

addSound

Adds a buzzer sound command to the command buffer.

Label sheet/
black mark sheet

addFeedPosition

Adds a paper feed command to the command buffer.

Command

addCommand

Adds a command to the command buffer.

HybridPrinter class


Controls the hybrid model printers.

API

Description

Initialization

HybridPrinter

Initializes the HybridPrinter class.

Communication path

connect

Connects to the printer.

disconnect

Disconnects from the printer.

Status monitor

startMonitor

Enables status event notification.

stopMonitor

Disables status event notification.

Status acquisition

getStatus

Acquires status of the connected printer.

Transmission

sendData

Transfers a print command.

Transaction

beginTransaction

Starts a transaction.

endTransaction

Ends a transaction.

Buffer clear

clearCommandBuffer

Clears the command buffer.

Print method

selectPaperType

Specifies a print method.

Paper feed

waitInsertion

Waiting for paper insertion.

cancelInsertion

Cancels waiting for paper insertion.

Paper eject

ejectPaper

Ejects paper.

MICR

readMicrData

MICR reading

cleanMicrReader

Cleans the MICR mechanism.

Forced transmission

forceRecover

Forced transmission function

forcePulse

forceCommand

forceReset

Print method acquisition

paperType

Acquires the print method setting information.

Monitor interval

interval

Printer status update interval

On standby

waitTime

Time from insertion of a paper to start of operation

40cpl mode

mode40Cpl

Sets the 40 cpl mode.

Reception of result

setStatusChangeEventListener

Registers the event listener method.

setReceiveEventListener

List of supported control operations for HybridPrinter class

APIs available for the HybridPrinter class depend on the type of control operation.

The following lists control operation types and available APIs.

API

Control operation

Receipt

Slip sheet

Endorsement

Validation

MICR

HybridPrinter

connect

disconnect

startMonitor

stopMonitor

getStatus

sendData

-

beginTransaction

endTransaction

clearCommandBuffer

-

selectPaperType

-

waitInsertion

-

-

cancelInsertion

-

ejectPaper

-

readMicrData

-

-

-

-

cleanMicrReader

-

-

-

-

setStatusChangeEventListener

setReceiveEventListener

Creating print document by the HybridPrinter class

The HybridPrinter class creates a print document using the same API as the Printer class.

The APIs and corresponding print methods are listed below.

API

Print method

Receipt

Slip sheet

Endorsement

Endorsement (40cpl)

Validation

Text

addTextAlign

-

addLineSpace

-

addTextRotate

addText

addTextLang

-

-

addTextFont

-

addTextSmooth

-

-

-

-

addTextSize

-

addTextStyle

*

*

-

*

addHPosition

Paper feed

addFeedUnit

addFeedLine

Graphics

addImage

-

-

-

-

addLogo

-

-

-

-

Barcode

addBarcode

-

-

-

-

addSymbol

-

-

-

-

Page mode

addPageBegin

-

-

addPageEnd

-

-

addPageArea

-

-

addPageDirection

-

-

addPagePosition

-

-

addPageLine

-

-

-

addPageRectangle

-

-

-

Cut

addCut

-

-

-

-

Drawer

addPulse

Command

addCommand

* The reverse parameter is not supported.

LineDisplay class


Controls character display on the customer display.

API

Description

Initialization

LineDisplay

Initializes the LineDisplay class.

Communication path

connect

Connects to the customer display.

disconnect

Disconnects from the customer display.

Status acquisition

getStatus

Acquires status of the connected device.

Transmission

sendData

Sends a command to the customer display.

Buffer clear

clearCommandBuffer

Clears the command buffer.

Reset

addInitialize

Initializes the customer display.

Window

addCreateWindow

Defines the display area.

addDestroyWindow

Deletes the display area setting.

addSetCurrentWindow

Switches between display areas.

addClearCurrentWindow

Deletes the current display area.

addCreateScreen

Defines the base window.

addCreateScreenCustom

Defines the base window.

addCreateTextArea

Defines the display area.

addDestroyTextArea

Deletes the display area setting.

addSetCurrentTextArea

Switches between display areas.

addClearCurrentTextArea

Deletes the current display area.

Cursor

addSetCursorPosition

Moves the cursor.

addMoveCursorPosition

Moves the cursor within the display area.

addSetCursorType

Changes the cursor display.

Text display

addText

Displays text.

addReverseText

Displays inverted text.

addMarqueeText

Displays a marquee.

Display setting

addSetBlink

Blinks display.

addSetBrightness

Changes the display brightness.

addBackgroundColor

Sets the background color.

Graphics

addStartSlideShow

Starts a slide show.

addStopSlideShow

Ends a slide show.

addDownloadImage

Displays an image.

addRegisterDownloadImage

Registers an image.

Graphics

addNVImage

Displays an NV image.

addClearImage

Deletes an image.

Barcode

addSymbol

Displays a two-dimensional symbol.

addClearSymbol

Deletes a two-dimensional symbol.

Clock

addShowClock

Displays the clock.

Command transfer

addCommand

Runs an optional command.

Reception of result

setReceiveEventListener

Registers the event listener method.

The APIs and parameters that can be used vary depending on the customer display used and its display modes.

The table below shows the API that can be used in each customer display and display mode.

API

Parameter

DM-D30

DM-D70

(Standard mode)

DM-D70

(Column/row fixed mode)

DM-D110/
DM-D210

LineDisplay

connect

disconnect

getStatus

sendData

clearCommandBuffer

addInitialize

addCreateWindow

-

addDestroyWindow

-

addSetCurrentWindow

-

addClearCurrentWindow

-

addCreateScreen

-

-

addCreateScreenCustom

-

-

addCreateTextArea

-

-

-

addDestroyTextArea

-

-

-

addSetCurrentTextArea

-

-

-

addClearCurrentTextArea

-

-

-

addSetCursorPosition

addMoveCursorPosition

addSetCursorType

-

-

addText

data

lang

✔*

✔*

x

y

r

-

-

-

g

-

-

-

b

-

-

-

addReverseText

-

-

addMarqueeText

addSetBlink

-

-

addSetBrightness

addBackgroundColor

-

-

-

addStartSlideShow

-

-

-

addStopSlideShow

-

-

-

addDownloadImage

-

-

-

addRegisterDownloadImage

-

-

-

addNVImage

-

-

-

addClearImage

-

-

-

addSymbol

-

-

-

addClearSymbol

-

-

-

addShowClock

-

-

-

addCommand

setReceiveEventListener

*: The setting value LineDisplay.LANG_MULTI cannot be used.

Keyboard class


Controls character entry from the keyboard.

API

Description

Initialization

Keyboard

Initializes the Keyboard class.

Communication path

connect

Connects to the keyboard.

disconnect

Disconnects from the keyboard.

Status acquisition

getStatus

Acquires status of the connected device.

String setting

setPrefix

Sets the condition to handle as a continuous string.

String setting acquisition

getPrefix

Acquires the set prefix.

Key detection

setKeyPressEventListener

Registers the event listener method.

String detection

setReadStringEventListener

POSKeyboard class


Controls character entry from the POS keyboard.

API

Description

Initialization

PosKeyboard

Initializes the POSKeyboard class.

Communication path

connect

Connects to the keyboard.

disconnect

Disconnects from the keyboard.

Status acquisition

getStatus

Acquires status of the connected device.

Key detection

setKeyPressEventListener

Registers the event listener method.

BarcodeScanner class


Controls barcode reading by the barcode scanner.

API

Description

Initialization

BarcodeScanner

Initializes the BarcodeScanner class.

Communication path

connect

Connects to the barcode scanner.

disconnect

Disconnects from the barcode scanner.

Status acquisition

getStatus

Acquires status of the connected device.

Input data reception

setScanEventListener

Registers the event listener method.

MSR class


Controls card reading by the MSR.

API

Description

Initialization

Msr

Initializes the MSR class.

Communication path

connect

Connects to the MSR.

disconnect

Disconnects from the MSR.

Status acquisition

getStatus

Acquires status of the connected device.

Data detection

setDataEventListener

Registers the event listener method.

SimpleSerial class


Controls serial communication between the printer and device.

API

Description

Initialization

SimpleSerial

Initializes the SimpleSerial class.

Communication path

connect

Connects to the serial.

disconnect

Disconnects from the serial.

Status acquisition

getStatus

Acquires status of the connected device.

Command transfer

sendCommand

Transfers a command.

Input data reception

setReceiveEventListener

Registers the event listener method.

GermanyFiscalElement class


Connects to the German fiscal element (TSE), and controls data read/write operations.

API

Description

Initialization

GermanyFiscalElement

Initializes the GermanyFiscalElement class.

Communication path

connect

Connects to the German fiscal element (TSE).

disconnect

Disconnects from the German fiscal element (TSE).

Status acquisition

getStatus

Acquires status of the German fiscal element (TSE).

Operation

operate

Send the JSONsring to the German fiscal element (TSE).

Reception of result

setReceiveEventListener

Registers the callback method for an event.

OtherPeripheral class


Controls peripheral devices via the developed device control programs.

API

Description

Initialization

OtherPeripheral

Initializes the OtherPeripheral class.

Communication path

connect

Connects to the device.

disconnect

Disconnects from the device.

Status acquisition

getStatus

Acquires status of the connected device.

Transmission

sendData

Sends data to the peripheral device.

Reception of result

setReceiveEventListener

Registers the event listener method.

CommBox class


Controls data transmission and reception using the communication box.

API

Description

Initialization

CommBox

Initialize the CommBox class.

Communication path

connect

Connects to the communication box.

disconnect

Disconnects from the communication box.

Status acquisition

getStatus

Acquires status of the connected device.

Transmission history

getCommHistory

Acquires the message transmission history.

Transmission

sendMessage

Sends a message to the communication box.

Reception

setReceiveEventListener

Registers the event listener method.

Common to all classes


These APIs can be used with all classes.

API

Description

Administration information

getAdmin

Acquires the administration information.

getLocation

Acquires the installation location information.

Reconnection

setConnectionEventListener

Registers the event listener method.

Discovery class


Controls the device discovery function.

API

Description

Start

start

Starts device search.

Stop

stop

Stops device search.

Epos2Exception class


Acquires the error status when an exception occurs.

API

Description

Error status acquisition

getErrorStatus

Acquires the error status when an exception is thrown.

Log class


Controls the log output function.

API

Description

Log

setLogSettings

Sets the log output function.

Version acquisition

SdkVersion

Acquires the Epson ePOS SDK version.

EasySelect class


EasySelect class and EasySelectInfo class offer API commands and member variables for selecting printers by using NFC tags or QR codes.

EasySelect class is for analyzing NFC tags and QR codes.

API

Description

Analyzing of NFC tags

parseNFC

Analyzes NFC tags data.

Analyzing of QR codes

parseQR

Analyzes QR codes data.

Creation of QR codes

createQR

Creates QR code data that can be analyzed by parseQR.

EasySelectInfo class


This class is for storing data analyzed by parseNFC or parseQR. Specify the stored information in connect API to connect with the printer.

Member variables

Description

Printer type

deviceType

Stores printer type information.

Printer name

printerName

Stores a printer name.

MAC address/BD address

macAddress

Stores a MAC address or a BD address.

 

Quick Access

  • [Name]
  • [Format]
  • [Range]
  • [Description]
  • [Notes]

Epson ePOS SDK includes patented or patent pending functions. The contents must not be disclosed to third parties.


Epson ePOS SDK for Android

Jump to the top