ePOS-Device for Android

    ePOS-Device SDK for Android

    The ePOS-Device SDK for Android is the SDK for creating Android application software (native application). By using the ePOS-Device SDK for Android, you can control the printer, TM printer connected to network, or peripherals such as a customer display or a barcode scanner connected to the printer, with simple code.

    List of ePOS-Device APIs

    ePOS-Device SDK for Android provides the following classes:

     Device class


    APIDescription

    Initialization

    Device

    Initializes the Device class.

    Communication path

    connect

    Establishes the communication path.

    disconnect

    Disconnects the communication path.

    isConnected

    Acquires connection status of the communication path.

    Device

    createDevice

    Acquires a device object.

    deleteDevice

    Deletes a device object.

    Administration information

    getAdmin

    Acquires the administration information.

    getLocation

    Acquires the installation location information.

    Inter-application communication

    getCommBoxManager

    Acquires the CommBoxManager class

    Reconnection start

    setReconnectingEventCallback

    Reconnection start event

    Reconnection end

    setReconnectEventCallback

    Reconnection end event

    Disconnection

    setDisconnectEventCallback

    Network disconnection event

     Display class


    APIDescription

    Window

    createWindow

    Creates the display area.

    destroyWindow

    Destroys the display area setting.

    setCurrentWindow

    Switches between display areas.

    clearWindow

    Clears the current display area.

    Cursor

    setCursorPosition

    Sets the cursor position.

    moveCursorPosition

    Moves the cursor within the display area.

    setCursorType

    Changes the cursor display.

    Text display

    addText

    Displays text.

    addReverseText

    Displays reversed text.

    addMarquee

    Displays a marquee.

    Display attribute

    setBlink

    Blinks the display.

    setBrightness

    Changes brightness of the display.

    Clock

    showClock

    Displays the clock.

    Command transfer

    addCommand

    Runs a command.

    Transmission

    sendData

    Sends a control command.

    Clear

    clearCommandBuffer

    Clears the command buffer.

    Initialization

    reset

    Reset

    Reception of result

    setReceiveEventCallback

    A control result reception event.

     Keyboard class


    APIDescription

    String setting

    setPrefix

    Sets the condition to handle as continuous string.

    Key detection

    setKeyPressEventCallback

    A key press detection event.

    String detection

    setStringEventCallback

    A string detection event.

     Printer class


    Two print modes are available; standard and page modes.

    • Standard mode
    • This mode prints text line by line. This mode adjusts the line feed amount depending on the character size, image size, and/or barcode height, and is suitable for printing a sales slip which changes in length depending on data quantity to print.

    • Page mode
    • This mode defines the print area and adjust print data (text, image, and/or barcode) to the size of the area for batch printing.
      To print in the page mode, use addPageBegin and addPageEnd to start and end the page mode process, respectively.

    APIDescriptionStandard modePage mode

    Text

    addTextAlign

    Adds text alignment setting to the command buffer.

    ×

    addTextLineSpace

    Adds line feed amount 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.

    addTextDouble

    Adds double-size character setting to the command buffer.

    addTextSize

    Adds character scaling factor setting to the command buffer.

    addTextStyle

    Adds character style setting to the command buffer.

    addTextPosition

    Adds character print position setting to the command buffer.

    addTextVPosition

    Adds vertical character print start 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.

    addFeedPosition

    Adds slip and label sheet control setting to the command buffer.

    ×

    addFeed

    Adds a line feed command 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.

    ×

    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.

    ×

    Layout

    addLayout

    Adds sheet layout setting to the command buffer.

    ×

    Recovery

    recover

    Recovers from a recoverable error.

    ×

    addRecovery

    Adds a recovery tag from an error.

    ×

    Reset

    reset

    Resets the printer.

    ×

    addReset

    Adds a reset tag of the printer.

    ×

    Command transfer

    addCommand

    Adds a command to the command buffer.

    Transmission

    sendData

    • Transfers a document to print.
    • Transfers a job by specifying its ID. *

    Clear

    clearCommandBuffer

    Clears the command buffer.

    Print job

    getPrintJobStatus

    Acquires the print result for the specified job ID.

    Status monitor

    startMonitor

    Enables status events.

    stopMonitor

    Disables status events.

    * Supported by ePOS-Device Service Ver.2.6 or later.

    APIDescription

    Image

    halftone property

    The halftone processing method of a raster image.

    brightness property

    The brightness compensation value for raster image.

    Forced transmission

    force property

    Forced transmission mode

    Timeout

    timeout property

    Transmission timeout period

    Monitor interval

    interval property

    The update interval of the printer status.

    Drawer open

    drawerOpenLevel property *1

    The signal line status of the drawer

    Reception of result

    setReceiveEventCallback

    • Response document reception event
    • Reception event for a specified job ID *2

    setStatusChangeEventCallback

    Status change event

    setBatteryStatusChangeEventCallback

    Battery status change event

    setOnlineEventCallback

    Online event

    setOfflineEventCallback

    Offline event

    setPowerOffEventCallback

    No-response event

    setCoverOkEventCallback

    Cover close event

    setCoverOpenEventCallback

    Cover open event

    setPaperOkEventCallback

    Paper presence event

    setPaperNearEndEventCallback

    Almost out of paper event

    setPaperEndEventCallback

    Out of paper event

    setDrawerClosedEventCallback

    Drawer close event

    setDrawerOpenEventCallback

    Drawer open event

    setBatteryOkEventCallback

    Battery remaining event

    setBatteryLowEventCallback

    Battery run-out event

    *1 Supported by ePOS-Device Service Ver.3.0 or later.

    *2 Supported by ePOS-Device Service Ver.2.6 or later.

     Scanner class


    APIDescription

    Data detection

    setDataEventCallback

    Barcode data detection event

     SimpleSerial class


    APIDescription

    String setting

    sendCommand

    Transfers a command.

    Response detection

    setCommandReplyEventCallback

    Command transmission result notification event

     CommBoxManager class


    APIDescription

    Inter-application communication

    openCommBox

    Opens the communication box.

    closeCommBox

    Closes the communication box.

     CommBox class


    APIDescription

    Transmission history

    getCommHistory

    Acquires the data transmission history.

    Transmission

    sendData

    Transmits data to the communication box.

    Reception

    setReceiveEventCallback

    Notifies of data reception in the communication box.

     Log class


    APIDescription

    Log

    setLogSettings

    Sets the log output function.

     EposException class


    APIDescription

    Error status acquisition

    getErrorStatus

    Acquires the error status when an exception is thrown.

     EposCallbackCode class


    A class with error status constants passed to a callback notification target method.


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

    Jump to the top