Example usage for android.print PrintJob isCompleted

List of usage examples for android.print PrintJob isCompleted

Introduction

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

Prototype

public boolean isCompleted() 

Source Link

Document

Gets whether this print job is completed.

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/*from   w  ww. j  a  v a 2  s .c om*/
 *      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;
                }
            }
        }
    });
}