WriteResultCallback

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

Base class for implementing a callback for the result of .
Requires API level 19 (Android 4.4, KitKat)

Summary

Public methods
open Unit

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

open Unit

Notifies that all the data was written.

open Unit

Notifies that an error occurred while writing the data.

Public methods

onWriteCancelled

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

Notifies that write was cancelled as a result of a cancellation request.
Requires API level 19 (Android 4.4, KitKat)

onWriteFinished

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

Notifies that all the data was written.
Requires API level 19 (Android 4.4, KitKat)

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.

onWriteFailed

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

Notifies that an error occurred while writing the data.
Requires API level 19 (Android 4.4, KitKat)

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