简体   繁体   English

从Samsung Galaxy XCover在Zebra MZ220上打印

[英]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". 我们试图在Samsung Galaxy XCover的Zebra MZ220上进行打印,但显示“无法确定打印机语言”。 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. 经过研究,我们发现了这个https://km.zebra.com/kb/index?page=content&id=SO8239&actp=LIST_RECENT,但它只隐藏了错误消息,打印机仍然无法打印。 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. 在Android三星Galaxy XCover上蓝牙始终成功 ,只要用户找到了解决方案,但他没有共享解决方案。

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. 固件是SDK的关键。 Go to www.zebra.com/firmware and make sure that you have the same firmware as is currently released. 请访问www.zebra.com/firmware,并确保您使用的固件与当前发布的固件相同。 This will solve this problem 99% of the time. 这将99%的时间解决此问题。

For the other 1% of the time, a little bit of sample code never hurts :) 在另外1%的时间里,一点点示例代码都不会伤害:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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