Opening A Device Port; Sending Data - Epson TM-T88V User Manual

Epos-print sdk for android
Hide thumbs Also See for TM-T88V:
Table of Contents

Advertisement

Opening a Device Port

Use the EpsonIo class's
//Initialize the EpsonIo class
EpsonIo mPort = new EpsonIo();
int errStatus = IoStatus.SUCCESS;
//Open the device port
try {
mPort.open(DevType.TCP, "192.168.192.168", null);
//Exception handling
} catch ( EpsonIoException e ) {
errStatus = e.getStatus();
}

Sending Data

Use the EpsonIo class's
Printing out "Hello, World!"
//Settings for sending
String str = "Hello, World!\r\n";
byte[] data = str.getBytes();
int offset = 0;
int size = data.length;
int timeout = 5000;
int sizeWritten = 0;
int errStatus = IoStatus.SUCCESS;
try {
//Send data
sizeWritten = mPort.write(data, offset, size, timeout);
//Exception handling
} catch ( EpsonIoException e ) {
errStatus = e.getStatus();
}
102
open (p.105)
to open a device port. Please refer to the following code.
write (p.108)
to send data to the printer. Please refer to the following code.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tm-t70Tm-p60Tm-u220

Table of Contents