Select your printer model

Parameters are refined by the selected printer.

setConnectionEventListener


Registers a listener method which receives a notification that a reconnection process has been started.

Be sure to perform a process (e.g., display a message to indicate that reconnection has been started) when setConnectionEventListener is run.

Syntax

 
public void setConnectionEventListener (ConnectionListener listener)

Parameter

listener

Specifies an object which has a notification target method.

Listener interface

 
public interface ConnectionListener extends EventListener

Listener method

 
void onConnection(Object deviceObj, int eventType)

Parameter

deviceObj

The callback source object is stored.

eventType

The type of the event that occurred is stored.

Event type

Description

*.EVENT_RECONNECTING

Reconnection start event

*. EVENT_RECONNECT

Reconnection completion event

*. EVENT_DISCONNECT

Disconnection event

Supplementary explanation

  • When this API is run multiple times, the listener method specified later takes effect.
  • If null is specified in listener when calling this API, the registered listener method is canceled.
  • It takes about 30 seconds for the disconnection event to occur after the disconnection.
  • Do not make any call operation when *.EVENT_RECONNECTING has occurred.
    Wait until *.EVENT_RECONNECT or *.EVENT_DISCONNECT occurs.
  • *. EVENT_DISCONNECT occurs in the following cases:
    When disconnect is running
    When connection fails after occurrence of *.EVENT_RECONNECTING
  • When *. EVENT_DISCONNECT occurs, it is not necessary to call disconnect.
    When disconnect is called, an exception with ERR_ILLEGAL stored in Epos2Exception will occur.
 

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