LR200M Android Bluetooth SDK Development
1. Introduction
(1) Software package name
com.RT_Printer.BluetoothPrinter.BLUETOOTH
(2) Class Name
Class Name
BluetoothPrintDriver
2. Methods in Class BluetoothPrintDriver
instantiation
BluetoothPrintDriver(this, mHandler);
Set Handler to receive the messages from SDK, Including state changes, Bluetooth to
send data, Bluetooth receive data (printer returned data: battery voltage, the error
status is returned by MESSAGE_READ) as well as a successful connection and
connection failures. Corresponding constants are:
MESSAGE_STATE_CHANGE,
MESSAGE_DEVICE_NAME, MESSAGE_TOAST
open and close the connection method
1. connect(device); Establish a connection with a Bluetooth device (OpenPrinter ()
method has expired)
2 stop(); Disconnect the Bluetooth device (close () method has expired)
3. IsNoConnection(); Judge the status of the Bluetooth connection
basic print method
1. Begin(); Initialize the printer
2. Print String or byte data type. Use this method to be sent the command directly to
the printer
(1)public static void
Parameter:
(2)public static void
Parameter:
(3)public static void
Parameter: out:byte data need to send
Discription
Bluetooth connection and printer operation
MESSAGE_WRITE,
BT_Write
(String
dataString)
dataString:String data need to send
BT_Write
(String
dataString,
dataString:String data need to send
bGBK:GBK
Flag,true
BT_Write
(byte[]
out)
boolean
bGBK)
or
false
MESSAGE_READ,
Need help?
Do you have a question about the LR200M and is the answer not in the manual?
Questions and answers