简体   繁体   中英

Printing on Zebra MZ220 from Samsung Galaxy XCover

We are trying to print on a Zebra MZ220 from Samsung Galaxy XCover and we get "Unable to determine printer language". From other devices it work fine. Do you have any ideas? Could you post your code sample?

After research we found this https://km.zebra.com/kb/index?page=content&id=SO8239&actp=LIST_RECENT but it only hides the error message, the printer still won't print. There is also this post Bluetooth on Android Samsung Galaxy XCover always succeeds where a user found the solution but he didn't share it.

Firmware is up to date.

 ZebraPrinterConnection thePrinterConn = new BluetoothPrinterConnection(
                              getAdressMac());

                              Looper.prepare();
                              try {
                                    thePrinterConn.open();

                                    ZebraPrinter printer;
                                    printer = ZebraPrinterFactory
                                                  .getInstance(thePrinterConn);
                                    Thread.sleep(500);
                                    Bitmap bitmap = StampilaPrint.getStampila(ctx, Print.this.idSpatiu);
                                    //com.zebra.android.comm.BluetoothPrinterConnection myConn = new com.zebra.android.comm.BluetoothPrinterConnection(macAdd);
                                    //com.zebra.android.printer.ZebraPrinter myPrinter = new com.zebra.android.printer.internal.ZebraPrinterCpcl(myConn); 
                                    printer.getGraphicsUtil().storeImage("IMAGE.PCX",
                                                  bitmap, 215, 215);

                                    printer.getToolsUtil().sendCommand(data);

                                    thePrinterConn.close();

Firmware is key with the SDK. Go to www.zebra.com/firmware and make sure that you have the same firmware as is currently released. This will solve this problem 99% of the time.

For the other 1% of the time, a little bit of sample code never hurts :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM