Added in API level 19

WriteResultCallback


abstract class WriteResultCallback
kotlin.Any
   ↳ android.print.PrintDocumentAdapter.WriteResultCallback

Base class for implementing a callback for the result of android.print.PrintDocumentAdapter#onWrite(android.print.PageRange[],android.os.ParcelFileDescriptor,android.os.CancellationSignal,android.print.PrintDocumentAdapter.WriteResultCallback).

Summary

Public methods
open Unit

Notifies that write was cancelled as a result of a cancellation request.

open Unit

Notifies that an error occurred while writing the data.

open Unit

Notifies that all the data was written.

Public methods

onWriteCancelled

Added in API level 19
open fun onWriteCancelled(): Unit

Notifies that write was cancelled as a result of a cancellation request.

onWriteFailed

Added in API level 19
open fun onWriteFailed(error: CharSequence!): Unit

Notifies that an error occurred while writing the data.

Parameters
error CharSequence!: The localized error message. shown to the user. May be null if error is unknown.

onWriteFinished

Added in API level 19
open fun onWriteFinished(pages: Array<PageRange!>!): Unit

Notifies that all the data was written.

Parameters
pages Array<PageRange!>!: The pages that were written. Cannot be null or empty.
Returning PageRange#ALL_PAGES indicates that all pages that were requested as the pages parameter in onWrite were written.