Example usage for android.print PrintJob isFailed

List of usage examples for android.print PrintJob isFailed

Introduction

In this page you can find the example usage for android.print PrintJob isFailed.

Prototype

public boolean isFailed() 

Source Link

Document

Gets whether this print job is failed.

Usage

From source file:de.appplant.cordova.plugin.printer.Printer.java

/**
 * Invokes the callback once the print job is complete or was canceled.
 *
 * @param job/*  ww  w.j  a va2s  .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;
                }
            }
        }
    });
}