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 |
onWriteFailed(error: CharSequence!) Notifies that an error occurred while writing the data. |
open Unit |
onWriteFinished(pages: Array<PageRange!>!) Notifies that all the data was written. |
Public methods
onWriteCancelled
open fun onWriteCancelled(): Unit
Notifies that write was cancelled as a result of a cancellation request.
onWriteFailed
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
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. |