Skip to content

Commit

Permalink
android fix - return error from print
Browse files Browse the repository at this point in the history
  • Loading branch information
recyclethis committed May 30, 2018
1 parent ad9a3bd commit a7c4c9a
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ private void print(JSONArray args, final CallbackContext callbackContext) {
}
cordova.getThreadPool().execute(new Runnable() {
public void run() {
instance.printCPCL(cpcl);
callbackContext.success();
if(instance.printCPCL(cpcl)){
callbackContext.success();
}else{
callbackContext.error("Print Failed. Printer Likely Disconnected.");
}
}
});
}
Expand Down

0 comments on commit a7c4c9a

Please sign in to comment.