instantListeners

fun instantListeners(onAuthenticationFailed: (InstantPdfDocument, InstantException) -> Unit? = null, onAuthenticationFinished: (InstantPdfDocument, String) -> Unit? = null, onSyncStarted: (InstantPdfDocument) -> Unit? = null, onSyncError: (InstantPdfDocument, InstantException) -> Unit? = null, onSyncFinished: (InstantPdfDocument) -> Unit? = null, onDocumentStateChanged: (InstantPdfDocument, InstantDocumentState) -> Unit? = null, onDocumentCorrupted: (InstantPdfDocument) -> Unit? = null): InstantDocumentListener

Creates an InstantDocumentListener with configurable callbacks for Instant document events.

Return

A configured InstantDocumentListener instance.

Parameters

onAuthenticationFailed

Called when Instant authentication fails.

onAuthenticationFinished

Called when Instant authentication completes.

onSyncStarted

Called when annotation sync starts.

onSyncError

Called when annotation sync fails.

onSyncFinished

Called when annotation sync completes.

onDocumentStateChanged

Called when the document state changes.

onDocumentCorrupted

Called when the document is detected as corrupted.