Select your printer model

Parameters are refined by the selected printer.

sendMessage


Sends a message to the communication box.

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 set listener method.

Syntax

 
public void sendMessage (String message, String targetId,SendMessageCallback callback) throws Epos2Exception

Parameter

message

Specifies data to send to the communication box.

targetId

Specifies the member ID of the receiver.

When null or "" (blank character) is specified, data is sent to all the members other than the transmitter.

callback

Specifies an object which has a notification target method.

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

Memory necessary for processing could not be allocated.

ERR_FAILURE

An unknown error occurred.

ERR_PROCESSING

Could not run the process.

ERR_ILLEGAL

This API was called while no communication had been started.

Listener interface

 
public interface SendMessageCallback extends EventListener

Definition of the listener method

 
void onCommBoxSendMessage (CommBox commBoxObj,int code, int count)

Parameter

commBoxObj

The callback source object is stored.

code

Error status

Description

CODE_SUCCESS

Processed successfully.

CODE_ERR_NOT_FOUND

Specified member ID cannot be found.

CODE_ERR_FAILURE

An unknown error occurred.

count

Number of clients which tried to send the message is stored.

 

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