I need to print a barcode in a mobile bluetooth printer brand “Bixolon” model “SPP-R200II” from an android application. Using the Bixolon SDK for Android does work for a Samsung SII but not for a Motorola moto G G2. I decided not using the SDK, instead I am sending commands to the printer based on the “unified command manual” by Bixolon. I am using these lines:
String codigo=”1234567894”;
int GS=29;
int k=107;
int m=5;
byte[] codigobytes=codigo.getBytes();
outputstream.write((byte)GS);
outputstream.write((byte)k);
outputstream.write((byte)m);
outputstream.write(codigobytes);
Based on the manual this command should print an “ITF” barcode but it does not. Connection with printer was successfully stablished; even I can print text but not barcodes with this command. Has anybody had better luck in printing barcodes with this method and printer? I appreciate your help and comments.
This is the code that worked fine in my app: