Select your printer model

Parameters are refined by the selected printer.

sendData


Sends the print command.

The error status of this API is the result of sending data to the devices.

The processing result of the devices using this API is notified to the listener method set by the setReceiveEventListener API of the Printer class.

Make sure not to use this API repeatedly without getting the result in the callback.

This API sends data buffered by an add-type API (e.g., addText).

Syntax

 
public void sendData (int timeout) throws Epos2Exception

Parameter

timeout

Specifies the timeout period before completion of printing in milliseconds.

Value

Description

Integer from 5000 to 600000*

Timeout period (in milliseconds)

Printer.PARAM_DEFAULT

Specifies the default value (10000).

* For the system configurations listed below, specify an integer in the range of 5000 to 300000.

  • Customer Display Models (SSL/TLS communication only)
  • TM Printer + DM-D + barcode scanner model
  • POS Terminal Model

Exception

When the process fails, Epos2Exception with one of the following error value occurs.

Error status

Description

ERR_PARAM

An invalid parameter was passed.

ERR_MEMORY

Necessary memory could not be allocated.

ERR_FAILURE

An unknown error occurred.

ERR_PROCESSING

Could not run the process.

ERR_ILLEGAL

The control commands have not been buffered.

This API was called while no communication had been started.

Supplementary explanation

For Bluetooth connection, the offline status may not be detected and a timeout error may occur.
Refer to Epson ePOS SDK for Android User's Manual for details.

 

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