android fix - return error from print

This commit is contained in:
Evan Moore 2018-05-30 11:20:35 -04:00
parent ad9a3bd515
commit a7c4c9ae2c

View File

@ -111,8 +111,11 @@ public class ZebraPrinter extends CordovaPlugin {
} }
cordova.getThreadPool().execute(new Runnable() { cordova.getThreadPool().execute(new Runnable() {
public void run() { public void run() {
instance.printCPCL(cpcl); if(instance.printCPCL(cpcl)){
callbackContext.success(); callbackContext.success();
}else{
callbackContext.error("Print Failed. Printer Likely Disconnected.");
}
} }
}); });
} }