I have a Zebra MZ220 portable Bluetooth printer.
Currently, I can print text / line on a printer through an Android app using the following code ...
private static void sendZplOverBluetooth(final String theBtMacAddress, final String Data) {
new Thread(new Runnable() {
public void run() {
try {
ZebraPrinterConnection thePrinterConn = new BluetoothPrinterConnection(theBtMacAddress);
Looper.prepare();
thePrinterConn.open();
String zplData = Data;
thePrinterConn.write(zplData.getBytes());
Thread.sleep(500);
thePrinterConn.close();
Looper.myLooper().quit();
}
catch (Exception e) {
e.printStackTrace();
}
}
}).start();
}
I want to know if there is a way to print the image on the printer through the Android application, if so, how? The image is saved on the SD card. Any help? thank
source
share