List of usage examples for android.print PrintJob isCancelled
public boolean isCancelled()
From source file:de.appplant.cordova.plugin.printer.Printer.java
/** * Invokes the callback once the print job is complete or was canceled. * * @param job/*from w w w .j av a 2s . c o m*/ * The reference to the print job */ private void invokeCallbackOnceCompletedOrCanceled(final PrintJob job) { cordova.getThreadPool().execute(new Runnable() { @Override public void run() { for (;;) { if (job.isCancelled() || job.isCompleted() || job.isFailed()) { command.success(); break; } } } }); }