Manual - POS - Printer SDK For Android API Reference Guide - English - Rev - 1 - 07 PDF
Manual - POS - Printer SDK For Android API Reference Guide - English - Rev - 1 - 07 PDF
http://www.bixolon.com
POS Printer
■ Table of Contents
1. About This Manual .............................................................................................................. 5
BIXOLON constantly makes improvements to the functions and quality and the
specifications of the product and the contents of this manual are subject to change without
prior notice for this reason.
2-1-2 Android applications can easily check the status of the printer with this SDK.
2-2 Functions
2-2-1 Print Settings (Alignment / Page Mode)
2-2-5 One-Dimensional Barcode Printing (Refer to the specifications of each printer for
supported barcode types)
2-2-6 Two-Dimensional Barcode Printing (Refer to the specifications of each printer for
supported barcode types)
3. Operation Environment
3-1 Android Version
3-1-1 Printing over Bluetooth or Wireless LAN: Android 2.2 (Froyo) or higher
3-2-3 LAN
3-2-4 USB
4. Development Environment
4-1 System Requirement
4-1-1 Operating System
Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)
Mac OS X 10.5.8 or later (x86 only)
Linux (tested on Ubuntu Linux, Lucid Lynx)
GNU C Library (glibc) 2.7 or later is required.
On Ubuntu Linux, version 8.04 or later is required.
64-bit distributions must be capable of running 32-bit applications.
4-2-1 Bluetooth
1. Select [Settings].
2. Bluetooth should be enabled and the printer power should be on.
3. Select [Bluetooth] for settings.
4. Select Scan. Search the printer to connect and perform pairing operation.
5. Enter PIN code. Default PIN code of BIXOLON device is “0000”.
5. Additional setting is not required to connect the Android device to the TCP/IP port of
printer.
Rev. 1.07 - 10 -
POS Printer
4-2-3 USB
1. Android device can be connected to USB peripheral devices using OS version 3.1
or higher.
2. Special driver or printer software of BIXOLON does not have to be installed in the
Android device.
3. Type of required USB cable depends on the type of smart phone or tablet device.
Most Android devices do not come with A to B USB cable and mini/micro USB
cable or adapter/dock might be required. Check whether the cable works with the
Android device to be used.
4. The following message may be displayed depending on Android device when
BIXOLON printer is connected first time.
Rev. 1.07 - 11 -
POS Printer
[AndroidManifest.xml]
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
/>
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
[device_filter.xml]
<usb-device
class="7"
protocol="2"
subclass="1"
vendor-id="5380" />
</resources>
Rev. 1.07 - 12 -
POS Printer
Rev. 1.07 - 13 -
POS Printer
5. Package Contents
5-1 Package
doc/Manual_POS_Android Printer SDK API Reference Guide_korean
_Rev_1_xx.pdf: Manual in Korean
doc/Manual_POS_Android Printer SDK API Reference Guide_English
_Rev_1_xx.pdf: Manual in English
libs/BixolonPrinter.jar: Printer library
libs/BixolonPrinterWithDoubleByteFontBinary.jar: Printer library that includes
doubles byte font binary that can be used with POS printer (KS5601, BIG5,
GB2312, SHIFT-JIS)
sample/BixolonPrinterSample: Sample program project folder
5-2 Download
BIXOLON Printer SDK for Android can be downloaded from the following link.
http://www.bixolon.com/html/en/download/download_category.xhtml?ca_id=104&large_cd
=0011&small_cd=0002
Rev. 1.07 - 14 -
POS Printer
6. Sample Program
This chapter explains how to use the sample program. (BixolonPrinterSample)
The sample is provided as an Android application project using Eclipse.
6-1 Functions
Search printer
Connect printer
Disconnect printer
Print text
Print image file
Print one-dimensional bar code
Print two-dimensional bar code
Print in the page mode
Cut paper
Check printer status
Check printer information
Rev. 1.07 - 15 -
POS Printer
Rev. 1.07 - 16 -
POS Printer
7. API Reference
This chapter describes the API provided by the Printer SDK.
* Syntax
public BixolonPrinter(Context context, Handler handler, Looper looper)
* Parameters
- context: is a context instance used to access Wi-Fi service, USB service, and file
system of Android.
- handler: is application handler to connect and receive print message.
- looper: Set main looper in application to create BixolonPrinter instance in a
separate thread in order to avoid the collision between the handler in application
and the internal handler in printer library. Set it to null to create BixolonPrinter
instance from the main thread.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- SPP-100II
- STP-103II
- SRP-275II
Rev. 1.07 - 17 -
POS Printer
* Example
}
};
}
Rev. 1.07 - 18 -
POS Printer
* Syntax
public void findBluetoothPrinters()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-350IIOBE
Rev. 1.07 - 19 -
POS Printer
* Example
Rev. 1.07 - 20 -
POS Printer
7-2-2 findNetworkPrinters
This method searches the printers connected to the same network as Android device that
runs the application. It sends the MESSAGE_NETWORK_DEVICE_SET message to the
application handler when the search operation is completed. The message includes the IP
addresses of the printers that can be connected. The return value will be null if no printer is
found.
* Syntax
public void findNetworkPrinters(int timeout)
* Parameters
- timeout: timeout in searching printer (millisecond)
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-275II
Rev. 1.07 - 21 -
POS Printer
* Example
Rev. 1.07 - 22 -
POS Printer
7-2-3 findUsbPrinters
This method obtains the information of the printer connected by USB with the Android
device that runs the application, and it sends the MESSAGE_USB_DEVICE_SET
message to the application handler. The message includes the information of the printer
connected by USB. The return value will be null if no USB printer is found.
* Syntax
public void findUsbPrinters()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
Rev. 1.07 - 23 -
POS Printer
* Example
Rev. 1.07 - 24 -
POS Printer
7-2-4 findUsbPrintersBySerial
This method obtains the information of the USB printer connected with Android device that
runs the application, and it sends the MESSAGE_USB_SERIAL_SET message to the
application handler. This method is used to identify a specific printer using USB serial
number when more than one printer of same model are connected.
Only the printer models with unique USB serial numbers can be used. The message
includes the USB serial numbers of the connected USB printers. This method returns null
if no USB printer is found.
* Syntax
public void findUsbPrintersBySerial()
* Supported printers
- SRP-350IIOBE
Rev. 1.07 - 25 -
POS Printer
* Example
Rev. 1.07 - 26 -
POS Printer
This method opens the printer port of USB printer and enables communication. It sends
the MESSAGE_STATE_CHANGE that includes STATE_CONNECTING in arg1 when
connection process is initiated and MESSAGE_STATE_CHANGE with
STATE_CONNECTED in arg1 when the connection is completed to the application handler.
The messages are transmitted in the following order when this method is called.
* If connection is successful
1. MESSAGE_STATE_CHANGE (arg1: STATE_CONNECTING): Connection is being
established.
2. MESSAGE_DEVICE_NAME: Connection to printer port is successful (USB device
name of the printer recognized in Android device is transmitted.)
3. MESSAGE_STATE_CHANGE (arg1: STATE_CONNECTED): Communication with
the printer is enabled.
* If connection fails
1. MESSAGE_TOAST: “Unable to connect device” message is sent.
2. MESSAGE_STATE_CHANGE (arg1: STATE_NONE): Printer is not connected.
* Syntax
public void connect()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
Rev. 1.07 - 27 -
POS Printer
* Example
case BixolonPrinter.STATE_CONNECTED:
// TODO: Processing when printer connection is completed
break;
case BixolonPrinter.STATE_NONE:
// TODO: Processing when printer is not connected
break;
}
break;
case BixolonPrinter.MESSAGE_DEVICE_NAME:
String connectedDeviceName =
msg.getData().getString(
BixolonPrinter.KEY_STRING_DEVICE_NAME);
break;
case BixolonPrinter.MESSAGE_TOAST:
Toast.makeText(getApplicationContext(),
msg.getData().getString(BixolonPrinter.KEY_STRING_TOAST),
Toast.LENGTH_SHORT).show();
break;
}
return true;
}
};
}
Rev. 1.07 - 28 -
POS Printer
7-3-2 connect
This method opens the port of paired Bluetooth printer and enables communication.
It sends the MESSAGE_STATE_CHANGE message with STATE_CONNECTING in arg1
when connection process is initiated and MESSAGE_STATE_CHANGE with
STATE_CONNECTED in arg1 when connection is completed to the application handler.
Messages are transmitted in the following order when this method is called.
* If connection is successful
1. MESSAGE_STATE_CHANGE (arg1: STATE_CONNECTING): Connection is being
established.
2. MESSAGE_DEVICE_NAME: Connection to printer port is successful. (Bluetooth
device name of the printer recognized by Android device is transmitted.)
3. MESSAGE_STATE_CHANGE (arg1: STATE_CONNECTED): Communication with
printer is enabled.
* If connection fails
1. MESSAGE_TOAST: “Unable to connect device” message is sent.
2. MESSAGE_STATE_CHANGE (arg1: STATE_NONE): Printer is not connected.
* Syntax
public void connect(String address)
* Parameters
- address: Bluetooth MAC address of the printer to connect (it can also be checked
with Self-Test function.) If this parameter is set to null, then connection will be tried
with the first searched printer among all paired printers.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-350IIOBE
Rev. 1.07 - 29 -
POS Printer
* Example
case BixolonPrinter.STATE_CONNECTED:
// TODO: Processing when printer connection is completed
break;
case BixolonPrinter.STATE_NONE:
// TODO: Processing when printer is not connected
break;
}
break;
case BixolonPrinter.MESSAGE_DEVICE_NAME:
String connectedDeviceName =
msg.getData().getString(
BixolonPrinter.KEY_STRING_DEVICE_NAME);
break;
case BixolonPrinter.MESSAGE_TOAST:
Toast.makeText(getApplicationContext(),
msg.getData().getString(BixolonPrinter.KEY_STRING_TOAST),
Toast.LENGTH_SHORT).show();
break;
}
return true;
}
};
}
Rev. 1.07 - 30 -
POS Printer
7-3-3 connect
This method opens the port of printer connected with LAN or Wireless LAN and enables
communication. It sends the MESSAGE_STATE_CHANGE message with
STATE_CONNECTING in arg1 when connection process is initiated and
MESSAGE_STATE_CHANGE with STATE_CONNECTED in arg1 when connection is
completed to the application handler.
Messages are transmitted in the following order when this method is called.
* If connection is successful
1. MESSAGE_STATE_CHANGE (arg1: STATE_CONNECTING): Connection is being
established
2. MESSAGE_DEVICE_NAME: Connection to printer port is successful. (Device
name of the printer recognized by Android device is transmitted.)
3. MESSAGE_STATE_CHANGE (arg1: STATE_CONNECTED): Communication with
printer is enabled.
* If connection fails
1. MESSAGE_TOAST: “Unable to connect device” message is sent.
2. MESSAGE_STATE_CHANGE (arg1: STATE_NONE): Printer is not connected.
* Syntax
public void connect(String host, int port, int timeout)
* Parameters
- host: IP address of the printer to connect
- port: Port number of the printer to connect (only 9100 is allowed.)
- timeout: Timeout in connecting printer (millisecond)
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-275II
Rev. 1.07 - 31 -
POS Printer
* Example
case BixolonPrinter.STATE_CONNECTED:
// TODO: Processing when printer connection is completed
break;
case BixolonPrinter.STATE_NONE:
// TODO: Processing when printer is not connected
break;
}
break;
case BixolonPrinter.MESSAGE_DEVICE_NAME:
String connectedDeviceName =
msg.getData().getString(
BixolonPrinter.KEY_STRING_DEVICE_NAME);
break;
case BixolonPrinter.MESSAGE_TOAST:
Toast.makeText(getApplicationContext(),
msg.getData().getString(BixolonPrinter.KEY_STRING_TOAST),
Toast.LENGTH_SHORT).show();
break;
}
return true;
}
};
}
Rev. 1.07 - 32 -
POS Printer
7-3-4 connect
This method opens the port of printer connected over USB and enables communication.
It sends the MESSAGE_STATE_CHANGE message with STATE_CONNECTING in arg1
when connection process is initiated and MESSAGE_STATE_CHANGE with
STATE_CONNECTED in arg1 when connection is completed to the application handler.
Messages are transmitted in the following order when this method is called.
* If connection is successful
1. MESSAGE_STATE_CHANGE (arg1: STATE_CONNECTING): Connection is being
established
2. MESSAGE_DEVICE_NAME: Connection to printer port is successful. (Device
name of the printer recognized by Android device is transmitted.)
3. MESSAGE_STATE_CHANGE (arg1: STATE_CONNECTED): Communication with
printer is enabled.
* If connection fails
1. MESSAGE_TOAST: “Unable to connect device” message is sent.
2. MESSAGE_STATE_CHANGE (arg1: STATE_NONE): Printer is not connected.
* Syntax
public void connect(UsbDevice device)
* Parameters
- device: UsbDevice instance of the device to connect. It can be received through the
message received as a response to findUsbPrinters().
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
Rev. 1.07 - 33 -
POS Printer
* Example
public class MainActivity extends Activity {
case BixolonPrinter.MESSAGE_STATE_CHANGE:
switch (msg.arg1) {
case BixolonPrinter.STATE_CONNECTING:
// TODO: Processing when connection to printer is being tried
break;
case BixolonPrinter.STATE_CONNECTED:
// TODO: Processing when printer connection is completed
break;
case BixolonPrinter.STATE_NONE:
// TODO: Processing when printer is not connected
break;
}
break;
case BixolonPrinter.MESSAGE_DEVICE_NAME:
String connectedDeviceName =
msg.getData().getString(
BixolonPrinter.KEY_STRING_DEVICE_NAME);
break;
case BixolonPrinter.MESSAGE_TOAST:
Toast.makeText(getApplicationContext(),
msg.getData().getString(BixolonPrinter.KEY_STRING_TOAST),
Toast.LENGTH_SHORT).show();
break;
}
return true;
}
};
}
Rev. 1.07 - 34 -
POS Printer
7-3-5 connectUsb
This method opens the port of printer connected over USB and enables communication.
It sends the MESSAGE_STATE_CHANGE message with STATE_CONNECTING in arg1
when connection process is initiated and MESSAGE_STATE_CHANGE with
STATE_CONNECTED in arg1 when connection is completed to the application handler.
Messages are transmitted in the following order when this method is called.
* If connection is successful
1. MESSAGE_STATE_CHANGE (arg1: STATE_CONNECTING): Connection is being
established
2. MESSAGE_DEVICE_NAME: Connection to printer port is successful. (Device
name of the printer recognized by Android device is transmitted.)
3. MESSAGE_STATE_CHANGE (arg1: STATE_CONNECTED): Communication with
printer is enabled.
* If connection fails
1. MESSAGE_TOAST: “Unable to connect device” message is sent.
2. MESSAGE_STATE_CHANGE (arg1: STATE_NONE): Printer is not connected.
* Syntax
public void connectUsb(String serial)
* Parameters
- device: USB serial number of the printer to connect. It can be received through the
message received as a response to findUsbPrintersBySerial().
Supported printers
- SRP-350IIOBE
Rev. 1.07 - 35 -
POS Printer
* Example
public class MainActivity extends Activity {
case BixolonPrinter.MESSAGE_STATE_CHANGE:
switch (msg.arg1) {
case BixolonPrinter.STATE_CONNECTING:
// TODO: Processing when connection to printer is being tried
break;
case BixolonPrinter.STATE_CONNECTED:
// TODO: Processing when printer connection is completed
break;
case BixolonPrinter.STATE_NONE:
// TODO: Processing when printer is not connected
break;
}
break;
case BixolonPrinter.MESSAGE_DEVICE_NAME:
String connectedDeviceName =
msg.getData().getString(
BixolonPrinter.KEY_STRING_DEVICE_NAME);
break;
case BixolonPrinter.MESSAGE_TOAST:
Toast.makeText(getApplicationContext(),
msg.getData().getString(BixolonPrinter.KEY_STRING_TOAST),
Toast.LENGTH_SHORT).show();
break;
}
return true;
}
};
}
Rev. 1.07 - 36 -
POS Printer
7-3-6 disconnect
The method closes the port of connected printer and terminates the connection.
When connection is terminated, it sends the MESSAGE_STATE_CHANGE messge (arg1:
STATE_NONE) to application handler.
* Syntax
public void disconnect()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- SPP-100II
- STP-103II
- SRP-275II
Rev. 1.07 - 37 -
POS Printer
* Example
case BixolonPrinter.STATE_CONNECTED:
mBixolonPrinter.disconnect();
break;
case BixolonPrinter.STATE_NONE:
Toast.makeText(getApplicationContext(), “Printer is disconnected”,
Toast.LENGTH_SHORT).show();
break;
}
break;
}
return true;
}
};
}
Rev. 1.07 - 38 -
POS Printer
7-4 Print
7-4-1 formFeed
This method performs paper feeding in the page mode or label mode.
* Syntax
public void formFeed(boolean getResponse)
* Parameters
- getResponse: A message is sent to the application handler upon completion of
feeding if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
Rev. 1.07 - 39 -
POS Printer
* Example
case MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 40 -
POS Printer
7-4-2 lineFeed
* Syntax
public void lineFeed(int lines, boolean getResponse)
* Parameters
- lines: number of lines to feed
- getResponse: A message is sent to the application handler upon completion of
feeding if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- SPP-100II
- STP-103II
- SRP-275II
Rev. 1.07 - 41 -
POS Printer
* Example
case MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 42 -
POS Printer
7-4-3 print1dBarcode
* Syntax
public void print1dBarcode(
String data, int barCodeSystem, int alignment, int width, int height,
int characterPosition, boolean getResponse)
* Parameters
- data: barcode data to print
- barCodeSystem: barcode system
Code Value Description
BAR_CODE_UPC_A 65 UPC-A
BAR_CODE_UPC_E 66 UPC-E
BAR_CODE_EAN13 67 EAN13
BAR_CODE_EAN8 68 EAN8
BAR_CODE_CODE39 69 CODE93
BAR_CODE_ITF 70 ITF
BAR_CODE_CODABAR 71 CODABAR
BAR_CODE_CODE93 72 CODE93
BAR_CODE_CODE128 73 CODE128
- alignment: barcode alignment
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- width: width of barcode (1 ~ 6)
- height: height of barcode (1 ~ 255)
- characterPosition: position to print barcode data string
Code Value Description
Character string
HRI_CHARACTER_NOT_PRINTED 0
is not printed
Character string
HRI_CHARACTER_ABOVE_BAR_CODE 1 is printed
above barcode
Character string
HRI_CHARACTER_BELOW_BAR_CODE 2 is printed
below barcode
Character string
HRI_CHARACTER_ABOVE_AND_BELOW_BAR_CODE 3 is printer above
and below barcode
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
Rev. 1.07 - 43 -
POS Printer
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
* Example
BixolonPrinter.HRI_CHARACTER_ABOVE_BAR_CODE, true);
}
break;
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 44 -
POS Printer
7-4-4 printBitmap
This method converts Bitmap instance to black and white image and prints the image.
* Syntax
public void printBitmap(
Bitmap bitmap, int alignment, int width, int level, boolean getResponse)
* Parameter
- bitmap: Bitmap instance to print
- alignment: Image alignment
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- width: width of image to print
Code Value Description
Image is enlarged or reduced to the maximum
BITMAP_WIDTH_FULL -1
printing width and printed.
Image is printed without resizing or reduced to the
BITMAP_WIDTH_NONE 0 maximum printing width if the image is wider than
the maximum width.
Integer Enter integer number directly
- level: brightness level of the image to print (13 ~ 88)
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
Rev. 1.07 - 45 -
POS Printer
* Example
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 46 -
POS Printer
7-4-5 printBitmap
This method converts Bitmap instance to black and white image and prints the image
* Syntax
public void printBitmap(
Bitmap bitmap, int alignment, int width, int level, boolean dither, Boolean compress,
boolean getResponse)
* Parameter
- bitmap: Bitmap instance to print
- alignment: Image alignment
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- width: width of image to print
Code Value Description
Image is enlarged or reduced to the maximum
BITMAP_WIDTH_FULL -1
printing width and printed.
Image is printed without resizing or reduced to the
BITMAP_WIDTH_NONE 0 maximum printing width if the image is wider than
the maximum width.
Integer Enter integer number directly
- level: brightness level of the image to print (13 ~ 88)
- dither: true to try bit dithering
- compress: true to compress bitmap to transfer
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SPP-R300
Rev. 1.07 - 47 -
POS Printer
* Example
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 48 -
POS Printer
7-4-6 printBitmap
* Syntax
public void printBitmap(
byte[] pixels, int alignment, int width, int height,boolean getResponse)
* Parameter
- pixels: image data to print
- alignment: Image alignment
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- width: width of image to print
- height: height of image to print
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
Rev. 1.07 - 49 -
POS Printer
* Example
case BixolonPrinter.MESSAGE_COMPLETE_PROCESS_BITMAP:
Bundle data = msg.getData();
byte[] pixels = data.getByteArray(
BixolonPrinter.KEY_STRING_MONO_PIXELS);
If (array != null) {
int width = msg.arg1;
int height = msg.arg2;
mBixolonPrinter.printBitmap(pixels,
BixolonPrinter.ALIGNMENT_LEFT,
width, height, true);
}
break;
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 50 -
POS Printer
7-4-7 printBitmap
This method converts the image file located in the specified path to black and white image
and prints the image.
* Syntax
public void printBitmap(
String pathName, int alignment, int width, int level, boolean getResponse)
* Parameter
- pathName: absolute path of the image file to print
- alignment: Image alignment
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- width: width of image to print. Height of the image is automatically adjusted in
proportion to the width.
Code Value Description
Image is enlarged or reduced to the maximum
BITMAP_WIDTH_FULL -1
printing width and printed.
Image is printed without resizing or reduced to the
BITMAP_WIDTH_NONE 0 maximum printing width if the image is wider than
the maximum width.
Integer Enter integer number directly
- level: brightness level of the image to print (13 ~ 88)
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
-
Rev. 1.07 - 51 -
POS Printer
* Example
Environment.getExternalStorageDirectory().getAbsolutePath() +
“/logo.png”;
mBixolonPrinter.printBitmap(pathName,
BixolonPrinter.ALIGNMENT_LEFT,
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 52 -
POS Printer
7-4-8 printBitmap
This method converts the image file located in the specified path to black and white image
and prints the image.
* Syntax
public void printBitmap(
String pathName, int alignment, int width, int level, boolean dither, Boolean compress,
boolean getResponse)
* Parameter
- pathName: absolute path of the image file to print
- alignment: Image alignment
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- width: width of image to print
Code Value Description
Image is enlarged or reduced to the maximum
BITMAP_WIDTH_FULL -1
printing width and printed.
Image is printed without resizing or reduced to the
BITMAP_WIDTH_NONE 0 maximum printing width if the image is wider than
the maximum width.
Integer Enter integer number directly
- level: brightness level of the image to print (13 ~ 88)
- dither: true to try bit dithering
- compress: true to compress bitmap to transfer
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SPP-R300
Rev. 1.07 - 53 -
POS Printer
* Example
Environment.getExternalStorageDirectory().getAbsolutePath() +
“/logo.png”;
mBixolonPrinter.printBitmap(pathName,
BixolonPrinter.ALIGNMENT_LEFT,
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 54 -
POS Printer
7-4-9 printDataMatrix
* Syntax
public void printDataMatrix(String data, int alignment, int size, boolean getResponse)
* Parameter
- data: DataMatrix barcode data to print
- alignment: alignment of print data
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- size: size of barcode data to print (2 ~ 3)
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
Rev. 1.07 - 55 -
POS Printer
* Example
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 56 -
POS Printer
7-4-10 printDotMatrixBitmap
This method converts Bitmap instance to black and white image data and prints the image
on dot matrix type printer.
* Syntax
public void printDotMatrixBitmap(
Bitmap bitmap, int alignment, int width, int level, boolean getResponse)
* Parameter
- bitmap: Bitmap instance to print
- alignment: Image alignment
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- width: width of image to print. Height of the image is automatically adjusted in
proportion to the width.
Code Value Description
Image is enlarged or reduced to the maximum
BITMAP_WIDTH_FULL -1
printing width and printed.
Image is printed without resizing or reduced to the
BITMAP_WIDTH_NONE 0 maximum printing width if the image is wider than
the maximum width.
Integer Enter integer number directly
- level: brightness level of the image to print (13 ~ 88)
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SRP-275II
Rev. 1.07 - 57 -
POS Printer
* Example
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 58 -
POS Printer
7-4-11 printDotMatrixBitmap
This method converts image file in the specified path to black and white image data and
prints the image on dot matrix type printer.
* Syntax
public void printDotMatrixBitmap(
String pathName, int alignment, int width, int level, boolean getResponse)
* Parameters
- pathName: absolute path of the image file to print
- alignment: Image alignment. Refer to the following table for possible options.
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- width: width of image to print. Height of the image is automatically adjusted in
proportion to the width. Refer to the following table for possible options.
Code Value Description
Image is enlarged or reduced to the maximum
BITMAP_WIDTH_FULL -1
printing width and printed.
Image is printed without resizing or reduced to
BITMAP_WIDTH_NONE 0 the maximum printing width if the image is wider
than the maximum width.
Integer Enter integer number directly
- level: brightness level of the image to print (13 ~ 88)
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SRP-275II
Rev. 1.07 - 59 -
POS Printer
* Example
Environment.getExternalStorageDirectory().getAbsolutePath() +
“/logo.png”;
mBixolonPrinter.printDotMatrixBitmap(pathName,
BixolonPrinter.ALIGNMENT_LEFT,
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 60 -
POS Printer
7-4-12 printDotMatrixText
* Syntax
public void printDotMatrixText(
String text, int alignment, int attribute, int size, boolean getResponse)
* Parameter
- text: character string to print
- alignment: character string alignment
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- attribute: attributes of character string printing. When more than one parameter is
configured, each option should be combined through bitwise OR operation. Refer to
the following table for possible options.
Code Value Description
TEXT_ATTRIBUTE_FONT_A 0 Font type A
TEXT_ATTRIBUTE_FONT_B 1 Font type B
TEXT_ATTRIBUTE_UNDERLINE1 4 Underline with 1 dot thickness
TEXT_ATTRIBUTE_UNDERLINE2 8 Underline with two dots thickness
TEXT_ATTRIBUTE_EMPHASIZED 16 Bold font
- size: size of character string to print. The width and hight parameters should be
combined through bitwise OR operation. Refer to the following table for possible
options.
Code Value Description
TEXT_SIZE_HORIZONTAL1 0 1X magnification on width
TEXT_SIZE_HORIZONTAL2 16 2X magnification on width
TEXT_SIZE_VERTICAL1 0 1X magnification in height
TEXT_SIZE_VERTICAL2 1 1X magnification in height
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SRP-275II
Rev. 1.07 - 61 -
POS Printer
* Example
BixolonPrinter.TEXT_ATTRIBUTE_FONT_A |
BixolonPrinter.TEXT_ATTRIBUTE_UNDERLINE1,
BixolonPrinter.TEXT_SIZE_HORIZONTAL1 |
BixolonPrinter.TEXT_SIZE_VERTICAL1, true);
}
break;
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 62 -
POS Printer
7-4-13 printMaxiCode
* Syntax
public void printMaxiCode(String data, int alignment, int mode, boolean getResponse)
* Parameters
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
Rev. 1.07 - 63 -
POS Printer
* Example
}
return true;
case MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
return true;
}
return true;
}
};
}
Rev. 1.07 - 64 -
POS Printer
7-4-14 printPdf
* Syntax
public void printPdf (
String path, int pagenum, int level, boolean dither, boolean compress,
boolean getResponse)
* Parameter
- path: absolute path of PDF file to print
- pagenum: page number of PDF file to print
- level: brightness of PDF file to print (13 ~ 88)
- dither: true to try bit dithering
- compress: true to compress PDF file to transfer
- getResponse: a message is sent to the application handler upon completion of
printing if this parameter is set to true, and message is not sent if it is set to false.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
Rev. 1.07 - 65 -
POS Printer
* Example
getExternalStorageDirectory().getAbsolutePath() + "/bixolon.pdf"”,
1, 50, true, true, true);
}
break;
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 66 -
POS Printer
7-4-15 printPdf417
* Syntax
public void printPdf417(
String data, int alignment, int width, int height, boolean getResponse)
* Parameter
- data: barcode data to print
- alignment: barcode printing alignment
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- width: width of barcode to print (2 ~ 3)
- height: height of barcode to print (2 ~ 8)
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- STP-103II
Rev. 1.07 - 67 -
POS Printer
* Example
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 68 -
POS Printer
7-4-16 printQrCode
* Syntax
public void printQrCode(
String data, int alignment, int model, int size, boolean getResponse)
* Parameter
- data: barcode data to print
- alignment: barcode printing alignment
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- model: QR Code model to print
Code Value Description
QR_CODE_MODEL1 48 QR Code model 1
QR_CODE_MODEL1 49 QR Code model 2
- size: size of barcode to print (1 ~ 8)
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
Rev. 1.07 - 69 -
POS Printer
* Example
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 70 -
POS Printer
7-4-17 printQrCode
* Syntax
public void printQrCode(
String data, int alignment, int model, int size, int errorCorrectionLevel,
boolean getResponse)
* Parameter
- data: barcode data to print
- alignment: barcode printing alignment
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- model: QR Code model to print
Code Value Description
QR_CODE_MODEL1 48 QR Code model 1
QR_CODE_MODEL1 49 QR Code model 2
- size: size of barcode to print (1 ~ 8)
- errorCorrectionLevel: error correction level of barcode to print
Code Value Description
QR_CODE_ERROR_CORRECTION_LEVEL_L 48 Error correction level L
QR_CODE_ERROR_CORRECTION_LEVEL_M 49 Error correction level M
QR_CODE_ERROR_CORRECTION_LEVEL_Q 50 Error correction level Q
QR_CODE_ERROR_CORRECTION_LEVEL_H 51 Error correction level H
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
Rev. 1.07 - 71 -
POS Printer
* Example
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 72 -
POS Printer
7-4-18 printSelfTest
This page prints Self-Test page. Printer settings and current code page are printed.
* Syntax
public void printSelfTest(boolean getResponse)
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- SPP-100II
- STP-103II
- SRP-275II
Rev. 1.07 - 73 -
POS Printer
* Example
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 74 -
POS Printer
7-4-19 printText
* Syntax
public void printText(String text, int alignment, int attribute, int size, boolean getResponse)
* Parameters
- text: character string to print
- alignment: character string alignment
Code Value Description
ALIGNMENT_LEFT 0 Align to left
ALIGNMENT_CENTER 1 Align to center
ALIGNMENT_RIGHT 2 Align to right
- attribute: attributes of the character string. When more than one parameter is
configured, each option should be combined through bitwise OR operation.
Code Value Description
TEXT_ATTRIBUTE_FONT_A 0 font type A (12X24)
TEXT_ATTRIBUTE_FONT_B 1 font type B (9X17)
TEXT_ATTRIBUTE_FONT_C 2 font type C (9X24)
TEXT_ATTRIBUTE_UNDERLINE1 4 Underline with 1 dot thickness
TEXT_ATTRIBUTE_UNDERLINE2 8 Underline with 2 dots thickness
TEXT_ATTRIBUTE_EMPHASIZED 16 Bold
TEXT_ATTRIBUTE_REVERSE 32 Reversed
- size: size of character string to print. The width and height parameters should be
combined through bitwise OR operation.
Code Value Description
TEXT_SIZE_HORIZONTAL1 0 1X magnification on width
TEXT_SIZE_HORIZONTAL2 16 2X magnification on width
TEXT_SIZE_HORIZONTAL3 32 3X magnification on width
TEXT_SIZE_HORIZONTAL4 48 4X magnification on width
TEXT_SIZE_HORIZONTAL5 64 5X magnification on width
TEXT_SIZE_HORIZONTAL6 80 6X magnification on width
TEXT_SIZE_HORIZONTAL7 96 7X magnification on width
TEXT_SIZE_HORIZONTAL8 112 8X magnification on width
TEXT_SIZE_VERTICAL1 0 1X magnification on height
TEXT_SIZE_VERTICAL2 1 2X magnification on height
TEXT_SIZE_VERTICAL3 2 3X magnification on height
TEXT_SIZE_VERTICAL4 3 4X magnification on height
TEXT_SIZE_VERTICAL5 4 5X magnification on height
TEXT_SIZE_VERTICAL6 5 6X magnification on height
TEXT_SIZE_VERTICAL7 6 7X magnification on height
TEXT_SIZE_VERTICAL8 7 8X magnification on height
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to True, and message is not sent if it is set to False.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
Rev. 1.07 - 75 -
POS Printer
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
-
* Example
BixolonPrinter.ALIGNMENT_LEFT,
BixolonPrinter.TEXT_ATTRIBUTE_FONT_A |
BixolonPrinter.TEXT_ATTRIBUTE_UNDERLINE1,
BixolonPrinter.TEXT_SIZE_HORIZONTAL1 |
BixolonPrinter.TEXT_SIZE_VERTICAL1, true);
}
break;
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
Rev. 1.07 - 76 -
POS Printer
7-5-1 automateStatusBack
This method enables or disables automatic status check function of printer. When it is
activated, the MESSAGE_READ message (arg1: PROCESS_AUTO_STATUS_BACK) is
sent to the application handler whenever there is any change in the printer status. The
arg2 includes the following values if there is any error in printer.
Code Value Description
AUTO_STATUS_COVER_OPEN 32 Printer cover is open.
AUTO_STATUS_NO_PAPER 12 No printer paper
* Syntax
public void automateStatusBack(boolean isEnable)
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
- SRP-275II
Rev. 1.07 - 77 -
POS Printer
* Example
public class MainActivity extends Activity {
if (mBixolonPrinter != null) {
mBixolonPrinter.automateStatusBack(false);
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
StringBuffer buffer = new StringBuffer(0);
if (msg.arg1 == BixolonPrinter.PROCESS_AUTO_STATUS_BACK) {
if ((msg.arg2 & BixolonPrinter.AUTO_STATUS_COVER_OPEN) ==
BixolonPrinter.AUTO_STATUS_COVER_OPEN) {
buffer.append("Cover is open.\n");
}
if ((msg.arg2 & BixolonPrinter.AUTO_STATUS_NO_PAPER) ==
BixolonPrinter.AUTO_STATUS_NO_PAPER) {
buffer.append("Paper end sensor: no paper present.\n");
}
if (buffer.capacity() > 0) {
Toast.makeText(getApplicationContext(), buffer.toString(),
Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(getApplicationContext(), "No error.",
Toast.LENGTH_SHORT).show();
}
break;
}
return true;
}
};
}
Rev. 1.07 - 78 -
POS Printer
7-5-2 getBatteryStatus
This method checks the battery status of mobile printer. The MESSAGE_READ message
(arg1: PROCESS_GET_BATTERY_STATUS) is sent to the application handler when
battery status check is completed. The arg2 of this message includes the following values
to indicate the battery status.
Code Value Description
STATUS_BATTERY_FULL 48 Battery is full.
STATUS_BATTERY_HIGH 49 Battery high high.
STATUS_BATTERY_MIDDLE 50 Battery is middle.
STATUS_BATTERY_LOW 51 Battery is low.
* Syntax
public void getBatteryStatus()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
Rev. 1.07 - 79 -
POS Printer
* Example
public class MainActivity extends Activity {
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 == BixolonPrinter.PROCESS_GET_BATTERY_STATUS) {
switch (msg.arg2) {
case BixolonPrinter.STATUS_BATTERY_FULL:
Toast.makeText(getApplicationContext(), “Battery is full”,
Toast.LENGTH_SHORT).show();
break;
case BixolonPrinter.STATUS_BATTERY_HIGH:
Toast.makeText(getApplicationContext(), “Battery is high”,
Toast.LENGTH_SHORT).show();
break;
case BixolonPrinter.STATUS_BATTERY_MIDDLE:
Toast.makeText(getApplicationContext(), “Battery is middle”,
Toast.LENGTH_SHORT).show();
break;
case BixolonPrinter.STATUS_BATTERY_LOW:
Toast.makeText(getApplicationContext(), “Battery is low”,
Toast.LENGTH_SHORT).show();
break;
}
}
break;
}
return true;
}
};
}
Rev. 1.07 - 80 -
POS Printer
7-5-3 getPrinterId
This method checks the printer information. When the information is available,
MESSAG_READ message (arg1: PROCESS_GET_PRINTER_ID) is sent to the
application handler.
* Syntax
public void getPrinterId(int idType)
* Parameters
- idType: Information of the printer to check
Code Value Description
PRINTER_ID_FIRMWARE_VERSION 65 Firmware version
PRINTER_ID_MANUFACTURER 66 Manufacturer (BIXOLON)
PRINTER_ID_PRINTER_MODEL 67 Printer model name
PRINTER_ID_CODE_PAGE 69 Current code page
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- SPP-100II
- STP-103II
- SRP-275II
Rev. 1.07 - 81 -
POS Printer
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
BixolonPrinter.PRINTER_ID_FIRMWARE_VERSION);
}
break;
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 == BixolonPrinter.PROCESS_GET_PRINTER_ID) {
Bundle data = msg.getData();
Toast.makeText(getApplicationContext(),
data.getString(BixolonPrinter.KEY_STRING_PRINTER_ID),
Toast.LENGTH_SHORT).show();
}
break;
}
return true;
}
};
}
Rev. 1.07 - 82 -
POS Printer
7-5-4 getReceiveBufferDataSize
This method checks the size of data stored in the printer receive buffer.
When the result is obtained, the MESSAGE_READ message (arg1:
PROCESS_GET_RECEIVE_BUFFER_DATA_SIZE)
is sent to the application handler.
* Syntax
public void getReceiveBufferDataSize()
* Supported printers
- SPP-100II
Rev. 1.07 - 83 -
POS Printer
* Example
public class MainActivity extends Activity {
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 ==
BixolonPrinter.PROCESS_GET_RECEIVE_BUFFER_DATA_SIZE) {
int receiveBufferDataSize = msg.arg2;
// TODO: Processing depending on the size of receive
buffer
}
break;
}
return true;
}
};
}
Rev. 1.07 - 84 -
POS Printer
7-5-5 getStatus
This method gets the status of printer. When the status is obtained, the MESSAGE_READ
message (arg1: PROCESS_GET_STATUS) is sent to the application handler.
The following values can be returned in arg2.
Code Value Description
STATUS_NORMAL 0 Normal
STATUS_COEVER_OPEN 4 Cover is open
Printer paper reaches to near end
STATUS_PAPER_NEAR_END 12
state
STATUS_PAPER_NOT_PRESENT 96 No printer paper
* Syntax
public void getStatus()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
- SRP-275II
Rev. 1.07 - 85 -
POS Printer
* Example
public class MainActivity extends Activity {
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 == BixolonPrinter.PROCESS_GET_STATUS) {
if (msg.arg2 == BixolonPrinter.STATUS_NORMAL) {
Toast.makeText(getApplicationContext(), "No error",
Toast.LENGTH_SHORT).show();
} else {
StringBuffer buffer = new StringBuffer();
if ((msg.arg2 & BixolonPrinter.STATUS_COVER_OPEN) ==
BixolonPrinter.STATUS_COVER_OPEN) {
buffer.append("Cover is open.\n");
}
if ((msg.arg2 & BixolonPrinter.STATUS_PAPER_NOT_PRESENT) ==
BixolonPrinter.STATUS_PAPER_NOT_PRESENT) {
buffer.append("Paper end sensor: paper not present.\n");
}
Toast.makeText(getApplicationContext(), buffer.toString(),
Toast.LENGTH_SHORT).show();
}
break;
}
return true;
}
};
}
Rev. 1.07 - 86 -
POS Printer
7-6 NV Image
7-6-1 defineNvImage
This method saves the image in the non-volatile memory area of printer. When image is
saved, the MESSAGE_WRITE message (arg1: PROCESS_DEFINE_NV_IMAGE) is sent
to the application handler.
* Syntax
public void defineNvImage(Bitmap bitmap, int width, int level, int keyCode)
* Paramters
- bitmap: Bitmap instance to save
- width: width of image to save
Code Value Description
Image is enlarged or reduced to the maximum
BITMAP_WIDTH_FULL -1
printing width and saved.
Image is saved without resizing or reduced to the
BITMAP_WIDTH_NONE 0 maximum printing width if the image is wider than the
maximum width.
Integer Enter integer number directly
- level: brightness level of image to save (13 ~ 88)
- keyCode: address of memory area to save image. (0 ~ 255)
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
Rev. 1.07 - 87 -
POS Printer
* Example
case BixolonPrinter.MESSAGE_WRITE:
if (msg.arg1 ==
BixolonPrinter.PROCESS_DEFINE_NV_IMAGE) {
mBixolonPrinter.disconnect();
}
break;
}
return true;
}
};
}
Rev. 1.07 - 88 -
POS Printer
7-6-2 defineNvImage
This method saves the image in the non-volatile memory area of printer. When image save
operation is completed, the MESSAGE_WRITE message (arg1:
PROCESS_DEFINE_NV_IMAGE) is sent to the application handler.
* Syntax
public void defineNvImage(String pathName, int width, int level, int keyCode)
* Paramters
- pathName: absolute path of the image file to save in printer
- width: width of image to save
Code Value Description
Image is enlarged or reduced to the maximum
BITMAP_WIDTH_FULL -1
printing width and saved.
Image is saved without resizing or reduced to the
BITMAP_WIDTH_NONE 0 maximum printing width if the image is wider than the
maximum width.
Integer Enter integer number directly
- level: brightness level of image to save (13 ~ 88)
- keyCode: address of memory area to save image (0 ~ 255)
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
-
Rev. 1.07 - 89 -
POS Printer
* Example
Environment.getExternalStorageDirectory().getAbsolutePath() +
“/logo.png”;
mBixolonPrinter.defineNvImage(pathName,
case MESSAGE_WRITE:
if (msg.arg1 ==
BixolonPrinter.PROCESS_DEFINE_NV_IMAGE) {
mBixolonPrinter.disconnect();
}
break;
}
return true;
}
};
}
Rev. 1.07 - 90 -
POS Printer
7-6-3 getDefinedNvImageKeyCodes
This method obtains the address of image saved in the non-volatile memory area of printer.
When address is obtained, the MESSAGE_READ message (arg1:
PROCESS_GET_NV_IMAGE_KEY_CODES) is sent to the application handler. If there is
any image stored in the area, the address list of the images is returned as integer array or
null is returned if there is no image.
* Syntax
public void getDefinedNvImageKeyCodes()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
Rev. 1.07 - 91 -
POS Printer
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 ==
BixolonPrinter.PROCESS_GET_NV_IMAGE_KEY_CODES) {
Bundle data = msg.getData();
int[] keyCodes =
data.getintArray(BixolonPrinter.NV_IMAGE_KEY_CODES);
if (keyCodes != null) {
// TODO: Image address processing
}
}
break;
}
return true;
}
};
}
Rev. 1.07 - 92 -
POS Printer
7-6-4 printNvImage
This method prints image stored in the non-volatile memory area of printer.
* Syntax
public void printNvImage(int keyCode, boolean getResponse)
* Parameters
- keyCode: address code of NV image to print
- getResponse: MESSAGE_PRINT_COMPLETE A message is sent to the
application handler upon completion of printing if this parameter is set to True, and
message is not sent if it is set to False.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
Rev. 1.07 - 93 -
POS Printer
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 ==
BixolonPrinter.PROCESS_GET_NV_IMAGE_KEY_CODES) {
Bundle data = msg.getData();
int[] keyCodes =
data.getintArray(BixolonPrinter.NV_IMAGE_KEY_CODES);
if (keyCodes != null) {
for (int i = 0; i < keyCodes.length; i++) {
mBixolonPrinter.printNvImage(keyCodes[i],
false);
}
}
}
break;
}
return true;
}
};
}
Rev. 1.07 - 94 -
POS Printer
7-6-5 removeAllNvImage
This method deletes all image data stored in the non-volatile memory area of printer.
* Syntax
public void printAllNvImage()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
Rev. 1.07 - 95 -
POS Printer
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
Rev. 1.07 - 96 -
POS Printer
7-6-6 removeNvImage
This function deletes image data stored in the non-volatile memory area of printer.
* Syntax
public void removeNvImage(int keyCode)
* Parameters
- keyCode: address code of the NV image to delete
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
Rev. 1.07 - 97 -
POS Printer
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 ==
BixolonPrinter.PROCESS_GET_NV_IMAGE_KEY_CODES) {
Bundle data = msg.getData();
int[] keyCodes =
data.getintArray(BixolonPrinter.NV_IMAGE_KEY_CODES);
if (keyCodes != null) {
mBixolonPrinter.removeNvImage(keyCodes[0]);
}
}
break;
}
return true;
}
};
}
Rev. 1.07 - 98 -
POS Printer
7-7-1 printBox
* Syntax
public void printBox(
int startX, int startY, int stopX, int stopY, int thickness, boolean getResponse)
* Parameter
- startX: The x-coordinate of the start point of the box
- startY: The y-coordinate of the start point of the box
- stopX: The x-coordinate of the end point of the box
- stopY: The y-coordinate of the end point of the box
- thickness: The thickness of box to print (1~-16)
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to true, and message is not sent if it is set to false
* Supported printers
- SPP-R300
Rev. 1.07 - 99 -
POS Printer
* Example
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
7-7-2 printLine
* Syntax
public void printLine(
int startX, int startY, int stopX, int stopY, int thickness, boolean getResponse)
* Parameter
- startX: The x-coordinate of the start point of the line
- startY: The y-coordinate of the start point of the line
- stopX: The x-coordinate of the end point of the line
- stopY: The y-coordinate of the end point of the line
- thickness: The thickness of line to print (1~-16)
- getResponse: A message is sent to the application handler upon completion of
printing if this parameter is set to true, and message is not sent if it is set to false
* Supported printers
- SPP-R300
* Example
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
7-7-3 setAbsolutePrintPosition
* Syntax
public void setAbsolutePrintPosition(int position)
* Parameters
- position: horizontal position to set
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
7-7-4 setAbsoluteVerticalPrintPosition
* Syntax
public void setAbsoluteVerticalPrintPosition(int position)
* Parameters
- position: vertical position to set
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
7-7-5 setPageMode
* Syntax
public void setPageMode()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
7-7-6 setPrintArea
* Syntax
public void setPrintArea(int x, int y, int width, int height)
* Parametes
- x: origin of the horizontal printing area
- y: origin of the vertical printing area
- width: width of printing area
- height: height of printing area
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
7-7-7 setPrintDirection
* Syntax
public void setPrintDirection(int direction)
* Parameter
- direction: direction of printing. Refer to the following table for possible options.
Code Value Description
DIRECTION_0_DEGREE_ROTATION 0 Print without rotation
DIRECTION_90_DEGREE_ROTATION 1 Print clockwise 90˚ rotated image
DIRECTION_180_DEGREE_ROTATION 2 Print clockwise 180˚ rotated image
DIRECTION_270_DEGREE_ROTATION 3 Print clockwise 270˚ rotated image
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
7-7-8 setStandardMode
This method closes the page mode and switches to the standard mode.
* Syntax
public void setStandardMode()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
* Example
public class MainActivity extends Activity {
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
BixolonPrinter.DIRECTION_180_DEGREE_ROTATION);
mBixolonPrinter.setPrintArea(0, 0, 384, 840);
mBixolonPrinter.setAbsoluteVerticalPrintPosition(100);
mBixolonPrinter.printBitmap(bitmap,
BixolonPrinter.ALIGNMENT_CENTER,
BixolonPrinter.BITMAP_WIDTH_FULL, 88,
false);
mBixolonPrinter.formFeed(true);
mBixolonPriner.setStandardMode();
}
break;
case MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
7-8-1 executeAutomaticCalibration
* Syntax
public void executeAutomaticCalibration()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
7-8-2 setLabelMode
* Syntax
public void setLabelMode()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
7-8-3 setReceiptMode
* Syntax
public void setReceiptMode()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
7-9 MSR
7-9-1 cancelMsrReaderMode
This method terminates the reader mode when the current mode is Track 1/2/3 Command
Read Mode. Printer cannot read the card when the read mode is terminated.
* Syntax
public void cancelMsrReaderMode()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
* Example
public class MainActivity extends Activity {
if (mBixolonPrinter != null) {
mBixolonPrinter.cancelMsrReaderMode();
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 == BixolonPrinter.PROCESS_GET_MSR_MODE) {
if (msg.arg2 ==
BixolonPrinter.MSR_MODE_TRACK123_COMMAND) {
mBixolonPrinter.setMsrReaderMode();
}
}
break;
}
return true;
}
};
}
7-9-2 getMsrMode
This method obtains the current MSR settings. When the settings are obtained, the
MESSAGE_READ message (arg1: PROCESS_GET_MSR_MODE) is sent to the
application handler. The arg2 of the message can have the following values.
Code Value Description
MSR_MODE_TRACK123_COMMAND 65 Track 1/2/3 command read mode
MSR_MODE_TRACK1_AUTO 66 Track 1 automatic trigger read mode
MSR_MODE_TRACK2_AUTO 67 Track 2 automatic trigger read mode
MSR_MODE_TRACK3_AUTO 68 Track 3 automatic trigger read mode
MSR_MODE_TRACK12_AUTO 69 Track 1/2 automatic trigger read mode
MSR_MODE_TRACK23_AUTO 70 Track 2/3 automatic trigger read mode
Track 1/2/3 automatic trigger read
MSR_MODE_TRACK123_AUTO 71
mode
MSR_MODE_NOT_USED 72 MSR is not used
* Syntax
public void getMsrMode()
* Paramters
- getResponse: MESSAGE_PRINT_COMPLETE message is sent to the application
handler when paper cut operation is completed if this parameter is set to True. If
this is set to False, message is not sent to the application handler after paper is cut.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 == BixolonPrinter.PROCESS_GET_MSR_MODE)
{
// TODO: Processing for MSR mode
}
break;
}
return true;
}
};
}
7-9-3 setMsrReaderMode
This method switches the mode to the reader mode so that printer can read the card in
Track 1/2/3 command read mode.
* Syntax
public void setMsrReaderMode()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 == BixolonPrinter.PROCESS_GET_MSR_MODE) {
if (msg.arg2 ==
BixolonPrinter.MSR_MODE_TRACK123_COMMAND) {
mBixolonPrinter.setMsrReaderMode();
}
}
break;
}
return true;
}
};
}
7-10 Settings
7-10-1 getBsCodePage
This method obtains the current code page. When code page information is obtained, the
MESSAGE_READ message (arg1: PROCESS_GET_BS_CODE_PAGE) is sent to the
application handler. The code page is returned in arg2 of the message as follows.
Code Value Description
CODE_PAGE_437_USA 0 Page 0 437(USA standard Europe)
CODE_PAGE_KATAKANA 1 Page 1 Katakana
CODE_PAGE_850_MULTILINGUAL 2 Page 2 850 (Multilingual)
CODE_PAGE_860_PORTUGUESE 3 Page 3 860 (Portuguese)
CODE_PAGE_863_CANADIAN_FRENCH 4 Page 4 863 (Canadian-French)
CODE_PAGE_865_NORDIC 5 Page 5 865 (Nordic)
CODE_PAGE_1252_LATIN1 16 Page 16 1252 (Latin I)
CODE_PAGE_866_CYRILLIC2 17 Page 17 866 (Cyrillic #2)
CODE_PAGE_852_LATIN2 18 Page 18 852 (Latin 2)
CODE_PAGE_858_EURO 19 Page 19 858 (Euro)
CODE_PAGE_862_HEBREW_DOS_CODE 21 Page 21 862 (Hebrew DOS code)
CODE_PAGE_864_ARABIC 22 Page 22 864 (Arabic)
CODE_PAGE_THAI42 23 Page 23 Thai42
CODE_PAGE_1253_GREEK 24 Page 24 1253 (Greek)
CODE_PAGE_1254_TURKISH 25 Page 25 1254 (Turkish)
CODE_PAGE_1257_BALTIC 26 Page 26 1257 (Baltic)
CODE_PAGE_FARSI 27 Page 27 Farsi
CODE_PAGE_1251_CYRILLIC 28 Page 28 1251 (Cyrillic)
CODE_PAGE_737_GREEK 29 Page 29 737 (Greek)
CODE_PAGE_775_BALTIC 30 Page 30 775 (Baltic)
CODE_PAGE_THAI14 31 Page 31 Thai14
CODE_PAGE_1255_HEBREW_NEW_CODE 33 Page 33 1255 (Hebrew Newcode)
CODE_PAGE_THAI11 34 Page 34 Thai11
CODE_PAGE_THAI18 35 Page 35 Thai18
CODE_PAGE_855_CYRILLIC 36 Page 36 855 (Cyrillic)
CODE_PAGE_857_TURKISH 37 Page 37 857 (Turkish)
CODE_PAGE_928_GREEK 38 Page 38 928 (Greek)
CODE_PAGE_THAI16 39 Page 39 Thai16
CODE_PAGE_1256_ARABIC 40 Page 40 1256 (ARB)
CODE_PAGE_1258_VIETNAM 41 Page 41 1258 (Vietnam)
CODE_PAGE_KHMER_CAMBODIA 42 Page 42 Khmer (Cambodia)
CODE_PAGE_1250_CZECH 43 Page 47 1250 (Czech)
* Syntax
public void getBsCodePage()
* Supported printers
- SRP-275II
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 == BixolonPrinter.PROCESS_BS_CODE_PAGE) {
data = msg.getData();
Toast.makeText(getApplicationContext(),
data.getString(BixolonPrinter.KEY_STRING_CODE_PAGE),
Toast.LENGTH_SHORT).show();
}
}
break;
}
return true;
}
};
}
7-10-2 getPowerSavingMode
This method obtains the power saving mode information of printer. When the information is
obtained, the MESSAGE_READ message (arg1:
PROCESS_GET_POWER_SAVING_MODE) is sent to the application handler. If power
saving mode is not set, 0 is returned in arg2. Time in millisecond is returned in arg2 if
power saving mode is enabled.
* Syntax
public void getPowerSavingMode()
* Supported printers
- SRP-350II / SRP-350IIK
- SRP-350plusII / SRP-352plusII
- SPP-100II
* Example
public class MainActivity extends Activity {
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 ==
BixolonPrinter.PROCESS_GET_POWER_SAVING_MODE) {
Toast.makeText(getApplicationContext(),
Integer.toString(msg.arg2) + “sec.”,
Toast.LENGTH_SHORT).show();
}
break;
}
return true;
}
};
}
7-10-3 getPrintDensity
This method obtains print density information of printer. When the information is obtained,
the MESSAGE_READ message (arg1:
PROCESS_GET_PRINT_DENSITY) is sent to the application handler. Print density
information is returned in arg2 of the message as follows.
Code Value Description
PRINT_DENSITY_LIGHT 0 Light
PRINT_DENSITY_DEFAULT 1 Basic
PRINT_DENSITY_DARK 2 Dark
* Syntax
public void getPrintDensity()
* Supported printers
- SRP-350II / SRP-350IIK
- SRP-350plusII / SRP-352plusII
- SPP-100II
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 ==
BixolonPrinter.PROCESS_GET_PRINT_DENSITY) {
// TODO: Processing based on print density
}
break;
}
return true;
}
};
}
7-10-4 getPrintSpeed
This method obtains print speed of printer. When the information is obtained,
the MESSAGE_READ message (arg1: PROCESS_GET_PRINT_SPEED) is sent to the
application handler. Print speed information is returned in arg2 of the message as follows.
Code Value Description
PRINT_SPEED_LOW 0 Low
PRINT_SPEED_MEDIUM 1 Medium
PRINT_SPEED_HIGH 2 High
* Syntax
public void getPrintSpeed()
* Supported printers
- SRP-350II / SRP-350IIK
- SRP-350plusII / SRP-352plusII
- SPP-100II
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 ==
BixolonPrinter.PROCESS_GET_PRINT_SPEED) {
// TODO: Processing denepding on print speed
}
break;
}
return true;
}
};
}
7-10-5 setBsCodePage
* Syntax
public void setBsCodePage(int codePage)
* Parameters
- codePage: code page to set
Code Value Description
CODE_PAGE_437_USA 0 Page 0 437(USA standard Europe)
CODE_PAGE_KATAKANA 1 Page 1 Katakana
CODE_PAGE_850_MULTILINGUAL 2 Page 2 850 (Multilingual)
CODE_PAGE_860_PORTUGUESE 3 Page 3 860 (Portuguese)
CODE_PAGE_863_CANADIAN_FRENCH 4 Page 4 863 (Canadian-French)
CODE_PAGE_865_NORDIC 5 Page 5 865 (Nordic)
CODE_PAGE_1252_LATIN1 16 Page 16 1252 (Latin I)
CODE_PAGE_866_CYRILLIC2 17 Page 17 866 (Cyrillic #2)
CODE_PAGE_852_LATIN2 18 Page 18 852 (Latin 2)
CODE_PAGE_858_EURO 19 Page 19 858 (Euro)
CODE_PAGE_862_HEBREW_DOS_CODE 21 Page 21 862 (Hebrew DOS code)
CODE_PAGE_864_ARABIC 22 Page 22 864 (Arabic)
CODE_PAGE_THAI42 23 Page 23 Thai42
CODE_PAGE_1253_GREEK 24 Page 24 1253 (Greek)
CODE_PAGE_1254_TURKISH 25 Page 25 1254 (Turkish)
CODE_PAGE_1257_BALTIC 26 Page 26 1257 (Baltic)
CODE_PAGE_FARSI 27 Page 27 Farsi
CODE_PAGE_1251_CYRILLIC 28 Page 28 1251 (Cyrillic)
CODE_PAGE_737_GREEK 29 Page 29 737 (Greek)
CODE_PAGE_775_BALTIC 30 Page 30 775 (Baltic)
CODE_PAGE_THAI14 31 Page 31 Thai14
CODE_PAGE_1255_HEBREW_NEW_CODE 33 Page 33 1255 (Hebrew Newcode)
CODE_PAGE_THAI11 34 Page 34 Thai11
CODE_PAGE_THAI18 35 Page 35 Thai18
CODE_PAGE_855_CYRILLIC 36 Page 36 855 (Cyrillic)
CODE_PAGE_857_TURKISH 37 Page 37 857 (Turkish)
CODE_PAGE_928_GREEK 38 Page 38 928 (Greek)
CODE_PAGE_THAI16 39 Page 39 Thai16
CODE_PAGE_1256_ARABIC 40 Page 40 1256 (ARB)
CODE_PAGE_1258_VIETNAM 41 Page 41 1258 (Vietnam)
CODE_PAGE_KHMER_CAMBODIA 42 Page 42 Khmer (Cambodia)
CODE_PAGE_1250_CZECH 43 Page 47 1250 (Czech)
* Supported printers
- SRP-275II
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
mBixolonPrinter.setBsCodePage(CODE_PAGE_437_USA);
}
break;
}
return true;
}
};
}
7-10-6 setDoubleByteFont
This method downloads the double byte font (KS5601, BIG5, GB2312, SHIFT-JIS) to
printer. When download is completed, the MESSAGE_WRITE message (arg1:
PROCESS_SET_DOUBLE_BYTE_FONT) is sent to the application handler. In this case,
the downloaded fonts will be applied after printer is rebooted after receiving this message.
* Syntax
public void setDoubleByteFont(int codePage)
* Parameters
- codePage: code page to set
Code Value Description
DOUBLE_BYTE_FONT_KS5601 124 Korean (KS5601)
DOUBLE_BYTE_FONT_BIG5 125 Chinese (BIG5)
DOUBLE_BYTE_FONT_GB2312 126 Chinese (GB2312)
DOUBLE_BYTE_FONT_SHIFT_JIS 127 Japanese (SHIFT-JIS)
* Supported printers
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
* Example
BixolonPrinter.DOUBLE_BYTE_FONT_KS5601);
}
break;
case BixolonPrinter.MESSAGE_WRITE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
7-10-7 setPowerSavingMode
* Syntax
public void setPowerSavingMode(boolean enabled, int time)
* Paramter
- enabled: Power saving mode is enabled if the value is True and disabled if it is
False.
- time: Set time in millisecond when enabling the power saving mode.
* Supported printers
- SRP-350II / SRP-350IIK
- SRP-350plusII / SRP-352plusII
- SPP-100II
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
7-10-8 setPrintDensity
* Syntax
public void setPrintDensity(int density)
* Parameters
- density: print density to set
Code Value Description
PRINT_DENSITY_LIGHT 0 Light
PRINT_DENSITY_DEFAULT 1 Basic
PRINT_DENSITY_DARK 2 Dark
* Supported printers
- SRP-350II / SRP-350IIK
- SRP-350plusII / SRP-352plusII
- SPP-100II
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
BixolonPrinter.PRINT_DENSITY_DEFAULT);
}
break;
}
return true;
}
};
}
7-10-9 setPrintSpeed
* Syntax
public void setPrintSpeed(int speed)
* Parameters
- speed: print speed to set
Code Value Description
PRINT_SPEED_LOW 0 Low
PRINT_SPEED_MEDIUM 1 Medium
PRINT_SPEED_HIGH 2 High
* Supported printers
- SRP-350II / SRP-350IIK
- SRP-350plusII / SRP-352plusII
- SPP-100II
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
mBixolonPrinter.setPrintSpeed(BixolonPrinter.PRINT_SPEED_HIGH);
}
break;
}
return true;
}
};
}
7-10-10 setSingleByteFont
* Syntax
public void setSingleByte(int codePage)
* Parameters
- codePage: code page to set
Code Value Description
CODE_PAGE_437_USA 0 Page 0 437(USA standard Europe)
CODE_PAGE_KATAKANA 1 Page 1 Katakana
CODE_PAGE_850_MULTILINGUAL 2 Page 2 850 (Multilingual)
CODE_PAGE_860_PORTUGUESE 3 Page 3 860 (Portuguese)
CODE_PAGE_863_CANADIAN_FRENCH 4 Page 4 863 (Canadian-French)
CODE_PAGE_865_NORDIC 5 Page 5 865 (Nordic)
CODE_PAGE_1252_LATIN1 16 Page 16 1252 (Latin I)
CODE_PAGE_866_CYRILLIC2 17 Page 17 866 (Cyrillic #2)
CODE_PAGE_852_LATIN2 18 Page 18 852 (Latin 2)
CODE_PAGE_858_EURO 19 Page 19 858 (Euro)
CODE_PAGE_862_HEBREW_DOS_CODE 21 Page 21 862 (Hebrew DOS code)
CODE_PAGE_864_ARABIC 22 Page 22 864 (Arabic)
CODE_PAGE_THAI42 23 Page 23 Thai42
CODE_PAGE_1253_GREEK 24 Page 24 1253 (Greek)
CODE_PAGE_1254_TURKISH 25 Page 25 1254 (Turkish)
CODE_PAGE_1257_BALTIC 26 Page 26 1257 (Baltic)
CODE_PAGE_FARSI 27 Page 27 Farsi
CODE_PAGE_1251_CYRILLIC 28 Page 28 1251 (Cyrillic)
CODE_PAGE_737_GREEK 29 Page 29 737 (Greek)
CODE_PAGE_775_BALTIC 30 Page 30 775 (Baltic)
CODE_PAGE_THAI14 31 Page 31 Thai14
CODE_PAGE_1255_HEBREW_NEW_CODE 33 Page 33 1255 (Hebrew Newcode)
CODE_PAGE_THAI11 34 Page 34 Thai11
CODE_PAGE_THAI18 35 Page 35 Thai18
CODE_PAGE_855_CYRILLIC 36 Page 36 855 (Cyrillic)
CODE_PAGE_857_TURKISH 37 Page 37 857 (Turkish)
CODE_PAGE_928_GREEK 38 Page 38 928 (Greek)
CODE_PAGE_THAI16 39 Page 39 Thai16
CODE_PAGE_1256_ARABIC 40 Page 40 1256 (ARB)
CODE_PAGE_1258_VIETNAM 41 Page 41 1258 (Vietnam)
CODE_PAGE_KHMER_CAMBODIA 42 Page 42 Khmer (Cambodia)
CODE_PAGE_1250_CZECH 43 Page 47 1250 (Czech)
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
BixolonPrinter.CODE_PAGE_437_USA);
}
break;
}
return true;
}
};
}
7-11-1 cutPaper
* Syntax
public void cutPaper(boolean getResponse)
* Paramters
- getResponse: When this parameter is set to True,
the MESSAGE_PRINT_COMPLETE message is sent to the application handler
when paper cut operation is completed. If it is set to False, message is not sent to
the application handler after paper is cut.
* Supported printers
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
* Example
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
7-11-2 cutPaper
This method feeds the paper by the specified number of lines and cut the paper.
* Syntax
public void cutPaper(int feeds, Boolean getResponse)
* Paramters
- feeds: number of lines to feed before cutting paper
- getResponse: When this parameter is set to True,
the MESSAGE_PRINT_COMPLETE message is sent to the application handler
when paper cut operation is completed. If it is set to False, message is not sent to
the application handler after paper is cut.
* Supported printers
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
* Example
mBixolonPrinter.cutPaper(10, true);
}
break;
case BixolonPrinter.MESSAGE_PRINT_COMPLETE:
mBixolonPrinter.disconnect();
break;
}
return true;
}
};
}
7-11-3 executeDirectIo
This method sends command directly to printer. If response is to be received from the
printer, the MESSAGE_READ message (arg1: PROCESS_EXECUTE_DIRECT_IO)
should be sent to the application handler.
* Syntax
public void executeDirectIo(byte[] command, boolean hasResponse)
* Parameters
- command: command to send to the printer
- hasResponse: Set this True if response to the command is to be received from the
printer, or False if not.
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- SPP-100II
- STP-103II
- SRP-275II
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_READ:
if (msg.arg1 == BixolonPrinter.PROCESS_EXECUTE_DIRECT_IO) {
Bundle data = msg.getData();
byte[] response =
data.getByteArray(BixolonPrinter.KEY_STRING_DIRECT_IO);
// TODO: response time
}
break;
}
return true;
}
};
}
7-11-4 getMacAddress
This method obtains and returns network MAC address of the printer connected with LAN
or Wireless LAN.
* Syntax
public String getMacAddress()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-275II
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
7-11-5 getMonoPixels
This method returns the result of conversion of Bitmap instance to black and white image
for printing to the application handler. When conversion is completed,
the MESSAGE_COMPLETE_PROCESS_BITMAP message is sent.
The width of converted image is contained in arg1 and the height of the converted image is
contained in arg2 of the message. If image conversion is successful, byte array type data
is returned. Null is returned if conversion fails.
* Syntax
public String getMonoPixels(Bitmap bitmap, int width, int level)
* Parameters
- bitmap: Bitmap instance to convert
- width: width of image to print
Code Value Description
Image is enlarged or reduced to the maximum
BITMAP_WIDTH_FULL -1
printing width and printed.
Image is printed without resizing or reduced to the
BITMAP_WIDTH_NONE 0 maximum printing width if the image is wider than
the maximum width.
Integer Enter integer number directly
- level: brightness level of the image to print (13 ~ 88)
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
* Example
public class MainActivity extends Activity {
…
private BixolonPrinter mBixolonPrinter;
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
case BixolonPrinter.MESSAGE_COMPLETE_PROCESS_BITMAP:
Bundle data = msg.getData();
byte[] array =
data.getByteArray(BixolonPrinter.KEY_STRING_MONO_PIXELS);
If (array != null) {
int width = msg.arg1;
int height = msg.arg2;
// TODO: Processing image data
}
break;
}
return true;
}
};
}
7-11-6 getMonoPixels
This method returns the result of conversion of stored image file to black and white image
for printing to the application handler. When conversion is completed,
the MESSAGE_COMPLETE_PROCESS_BITMAP message is sent.
The width of converted image is contained in arg1 and the height of the converted image is
contained in arg2 of the message. If image conversion is successful, byte array type data
is returned. Null is returned if conversion fails.
* Syntax
public String getMonoPixels(String pathName, int width, int level)
* Parameters
- pathName: absolute path of the image file to convert
- width: width of image to print
Code Value Description
Image is enlarged or reduced to the maximum
BITMAP_WIDTH_FULL -1
printing width and printed.
Image is printed without resizing or reduced to the
BITMAP_WIDTH_NONE 0 maximum printing width if the image is wider than
the maximum width.
Integer Enter integer number directly
- level: brightness level of the image to print (13 ~ 88)
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- STP-103II
- SPP-100II
* Example
public class MainActivity extends Activity {
…
private BixolonPrinter mBixolonPrinter;
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
Environment.getExternalStorageDirectory().getAbsolutePath() +
“/logo.png”;
mBixolonPrinter.getMonoPixels(pathName,
BixolonPrinter.BITMAP_WIDTH_FULL, 50);
}
break;
case BixolonPrinter.MESSAGE_COMPLETE_PROCESS_BITMAP:
Bundle data = msg.getData();
byte[] array =
data.getByteArray(BixolonPrinter.KEY_STRING_MONO_PIXELS);
If (array != null) {
int width = msg.arg1;
int height = msg.arg2;
// TODO: Processing image data
}
break;
}
return true;
}
};
}
7-11-7 getUsbSerial
This method returns USB serial number of the printer connected over USB.
* Syntax
public String getUsbSerial()
* Supported printers
- SRP-350IIOBE
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
7-11-8 initialize
This method initializes the printer settings to a state the same as after booting. The data in
the printer buffer is initialized but the data in the printer receive buffer is not. NV image
stored in the printer is not initialized. If the printer is in the page mode, all data in the print
area is removed and the printer is initialized to the standard mode.
* Syntax
public void initialize()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- SPP-100II
- STP-103II
- SRP-275II
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
7-11-9 kickOutDrawer
* Syntax
public void kickOutDrawer(int connectorPin)
* Parameter
- connectorPin: connector pin of cash register or melody box
Code Value Description
DRAWER_CONNECTOR_PIN2 0 Connector pin 2
DRAWER_CONNECTOR_PIN5 1 Connector pin 5
* Supported printers
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- STP-103II
- SRP-330
- SRP-150
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
mBixolonPrinter.kickOutDrawer(DRAWER_CONNECTOR_PIN5);
}
break;
}
return true;
}
};
}
7-11-10 setPrintColor
* Syntax
public void setPrintColor(int color)
* Parameter
- color: print color to set
Code Value Description
COLOR_BLACK 0 Black
COLOR_RED 1 Red
* Supported printers
- SRP-275II
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.disconnect();
}
7-11-11 shutDown
This method terminates the connection with the printer and releases all resources.
BixolonPrinter instance is not available anymore after executing this method.
* Syntax
public void shutDown()
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- SPP-100II
- STP-103II
- SRP-275II
* Example
if (mBixolonPrinter != null) {
mBixolonPrinter.shutDown();
}
7-11-12 updateFirmware
This method sends the specified firmware binary file to the printer and updates the printer
firmware. Printer should be rebooted after updating printer firmware.
* Syntax
public void updateFirmware(String binaryFilePath)
* Parameters
- binaryFilePath: absolute path fo the firmware binary file to send to printer
* Supported printers
- SPP-R200II / SPP-R300 / SPP-R400
- SRP-F310 / SRP-F312
- SRP-350II / SRP-350IIK / SRP-350IIOBE
- SRP-350plusII / SRP-352plusII
- SRP-330
- SRP-150
- SPP-100II
- STP-103II
- SRP-275II
* Example
Environment.getExternalStorageDirectory().getAbsolutePath() +
“/SPP-R200II Vxx.xx_xxxxxx.fls”;
mBixolonPrinter.updateFirmware(binaryFilePath);
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
mBixolonPrinter.disconnect();
}
break;
}
return true;
}
};
}
8. Programming
8-1 Programming Flow
Applications should be programmed in the following sequence.
1. Search printer
2. Open printer port
3. Send print data
4. Close printer port
}
}
case BixolonPrinter.MESSAGE_USB_DEVICE_SET:
if (msg.obj ! = null) {
Set<String> networkDeviceSet = (Set<String>) msg.obj;
String[] networkDevices =
networkDeviceSet.toArray(new
String[networkDeviceSet.size()]);
mBixolonPrinter.connect(networkDevices[i].getAddress(),
9100, 5000);
}
break;
case BixolonPrinter.MESSAGE_NETWORK_DEVICE_SET:
if (msg.obj ! = null) {
Set<UsbDevice> usbDeviceSet = (Set<UsbDevice>)
msg.obj;
UsbDevice[] usbDevices =
usbDeviceSet.toArray(new
UsbDevice[usbDeviceSet.size()]);
mBixolonPrinter.connect(usbDevices[i]);
}
break;
}
return true;
}
}
9. Appendix
9-1 Supported Methods for each printer model
SRP-
SPP-
SRP- 350II
R200II
Methods F310 350IIK
R300
F312 350plusII
R400
352plusII
void automateStatusBack(boolean isEnable) O O O
void cancelMsrReaderMode() O X X
void connect() O O O
void connect(String address) O X X
void connect(String host, int port, int timeout) O O O
void connect(UsbDevice device) O O O
void connectUsb(String serial) X X O
void cutPaper(boolean getResponse) X O O
void cutPaper(int feeds, boolean getResponse) X X O
void defineNvImage(Bitmap bitmap, int width, int
O O O
level, int keyCode)
void defineNvImage(String pathName, int width,
O O O
int level, int keyCode)
void disconnect() O O O
void executeAutomaticCalibration() O X O
void executeDirectIo(byte[] command, boolean
O O O
hasResponse)
void findBluetoothPrinters() O X X
void findNetworkPrinters(int timeout) O O O
void findUsbPrinters() O O O
void findUsbPrintersBySerial() X X X
void formFeed(boolean getResponse) O O O
void getBatteryStatus() O X X
void getBatteryVoltageStatus() X X X
void getBsCodePage() X X X
void getDefinedNvImageKeyCode() O O O
String getMacAddress() O O O
void getMonoPixels(Bitmap bitmap, int width, int
O O O
level)
void getMonoPixels(String pathName, int width,
O O O
int level)
void getMsrMode() O X X
void getPowerMode() X X X
void getPowerSavingMode() X X O
void getPrintDensity() X X O
void getPrinterId(int idType) O O O
void getPrintSpeed() X X O
void getReceiveBufferDataSize() X X X
void getStatus() O O O
void getTphThermistorStatus() X X X
String getUsbSerial() X X X
SRP-
SPP-
SRP- 350II
R200II
Methods F310 350IIK
R300
F312 350plusII
R400
352plusII
void initialize() O O O
void kickOutDrawer() X O O
void linefeed(int lines, Boolean getResponse) O O O
void print1dBarcode(String data,
int barCodeSystem, int alignment, int width, O O O
int height)
void printBitmap(Bitmap bitmap, int alignment,
O O O
int width, int level, boolean getResponse)
void printBitmap(byte[] pixels, int alignment,
O O O
int width, int level, boolean getResponse)
void printBitmap(String pathName,
int alignment, int width, int level, O O O
boolean getResponse)
void printDataMatrix(String data, int alignment,
O X X
int size, boolean getResponse)
void printDotMatrixBitmap(Bitmap bitmap,
int alignment, int width, int level, X X X
boolean getResponse)
void printDotMatrixBitmap(String pathName,
int alignment, int width, int level, X X X
boolean getResponse)
void printDotMatrixText(String text,
int alignment, int attribute, int size, X X X
boolean getResponse)
void printMaxiCode(String data, int alignment,
O X X
int mode, boolean getResponse)
void printNvImage(int keyCode,
O O O
boolean getResponse)
void printPdf417(String data, int alignment,
O O O
int width, int height, Boolean getResponse)
void printQrCode(String data, int alignment,
O O O
int model, int size, boolean getResponse)
void printSelfTest(Boolean getResponse) O O O
void printText(String text, int alignment,
O O O
int attribute, int size, boolean getResponse)
void removeAllNvImage() O O O
void removeNvImage(int keyCode) O O O
void setAbsolutePrintPosition(int position) O O O
void setAbsoluteVerticalPrintPosition
O O O
(int position)
void setBsCodePage(int codePage) X X X
void setDoubleByteFont(int codePage) X O O
void setLabelMode() O X X
void setMsrReaderMode() O X X
void setPageMode() O O X
SRP-
SPP-
SRP- 350II
R200II
Methods F310 350IIK
R300
F312 350plusII
R400
352plusII
void setPowerSavingMode(Boolean enabled,
X X O
int time)
void setPrintArea(int x, int y, int width, int height) O O X
void setPrintColor(int color) X X X
void setPrintDensity(int density) X X X
void setPrintDirection(int direction) O O X
void setPrintSpeed(int speed) X X O
void setReceiptMode() O X X
void setSingleByteFont(int codePage) O O O
void setStandardMode() O O X
void shutdown() O O O
void updateFirmware(String binaryFilePath) O O O
SRP-
Methods SRP-330 SRP-150
350IIOBE
void automateStatusBack(boolean isEnable) O O O
void cancelMsrReaderMode() X X X
void connect() O O O
void connect(String address) O X X
void connect(String host, int port, int timeout) O O X
void connect(UsbDevice device) O O X
void connectUsb(String serial) O X X
void cutPaper(boolean getResponse) O O O
void cutPaper(int feeds, boolean getResponse) O O O
void defineNvImage(Bitmap bitmap, int width,
O O O
int level, int keyCode)
void defineNvImage(String pathName, int width,
O O O
int level, int keyCode)
void disconnect() O O O
void executeAutomaticCalibration() X X X
void executeDirectIo(byte[] command,
O O O
boolean hasResponse)
void findBluetoothPrinters() O X X
void findNetworkPrinters(int timeout) O O X
void findUsbPrinters() O O O
void findUsbPrintersBySerial() O X X
void formFeed(boolean getResponse) X X X
void getBatteryStatus() X X X
void getBatteryVoltageStatus() X X X
void getBsCodePage() X X X
void getDefinedNvImageKeyCode() O O O
String getMacAddress() O O X
void getMonoPixels(Bitmap bitmap, int width,
O O O
int level)
void getMonoPixels(String pathName, int width,
O O O
int level)
void getMsrMode() X X X
void getPowerMode() X X X
void getPowerSavingMode() O X X
void getPrintDensity() O X X
void getPrinterId(int idType) O O O
void getPrintSpeed() O X X
void getReceiveBufferDataSize() X X X
void getStatus() O O O
void getTphThermistorStatus() X X X
String getUsbSerial() O X X
void initialize() O O O
void kickOutDrawer() O O O
void linefeed(int lines, Boolean getResponse) O O O
SRP-
Methods SRP-330 SRP-150
350IIOBE
void print1dBarcode(String data,
int barCodeSystem, int alignment, int width, O O O
int height)
void printBitmap(Bitmap bitmap, int alignment,
O O O
int width, int level, boolean getResponse)
void printBitmap(byte[] pixels, int alignment,
O O X
int width, int level, boolean getResponse)
void printBitmap(String pathName,
int alignment, int width, int level, O O X
boolean getResponse)
void printDataMatrix(String data, int alignment,
X O X
int size, boolean getResponse)
void printDotMatrixBitmap(Bitmap bitmap,
int alignment, int width, int level, X X X
boolean getResponse)
void printDotMatrixBitmap(String pathName,
int alignment, int width, int level, X X X
boolean getResponse)
void printDotMatrixText(String text,
int alignment, int attribute, int size, X X X
boolean getResponse)
void printMaxiCode(String data, int alignment,
X X X
int mode, boolean getResponse)
void printNvImage(int keyCode,
O O O
boolean getResponse)
void printPdf417(String data, int alignment,
O O O
int width, int height, Boolean getResponse)
void printQrCode(String data, int alignment,
O O O
int model, int size, boolean getResponse)
void printSelfTest(Boolean getResponse) O O O
void printText(String text, int alignment,
O O O
int attribute, int size, boolean getResponse)
void removeAllNvImage() O O X
void removeNvImage(int keyCode) O O X
void setAbsolutePrintPosition(int position) X X X
void setAbsoluteVerticalPrintPosition
X X O
(int position)
void setBsCodePage(int codePage) X X X
void setDoubleByteFont(int codePage) O O X
void setLabelMode() X X X
void setMsrReaderMode() X X X
void setPageMode() X X X
void setPowerSavingMode(Boolean enabled,
O X X
int time)
void setPrintArea(int x, int y, int width, int height) X X X
void setPrintColor(int color) X X O
void setPrintDensity(int density) O X O
SRP-
Methods SRP-330 SRP-150
350IIOBE
void setPrintDirection(int direction) X X X
void setPrintSpeed(int speed) O X X
void setReceiptMode() X X X
void setSingleByteFont(int codePage) O O O
void setStandardMode() X X X
void shutdown() O O O
void updateFirmware(String binaryFilePath) O O O