Listener

interface Listener

Interface for listening to messages from the remote mdoc device.

Functions

Link copied to clipboard
abstract fun onDeviceConnected()

Called when connected to a remote mdoc device.

Link copied to clipboard
abstract fun onDeviceDisconnected(transportSpecificTermination: Boolean)

Called when the remote mdoc device disconnects normally, that is using the session termination functionality in the underlying protocols.

Link copied to clipboard
abstract fun onDeviceEngagementReceived(connectionMethods: List<MdocConnectionMethod>)

Called when a valid device engagement is received from QR code of NFC.

Link copied to clipboard
abstract fun onError(error: Throwable)

Called when an unrecoverable error happens, for example if the remote device disconnects unexpectedly (e.g. without first sending a session termination request).

Link copied to clipboard
abstract fun onMoveIntoNfcField()

Called when NFC data transfer has been selected but the mdoc reader device isn't yet in the NFC field of the mdoc device.

Link copied to clipboard
abstract fun onReaderEngagementReady(readerEngagement: ByteArray)

Called when using reverse engagement and the reader engagement is ready.

Link copied to clipboard
abstract fun onResponseReceived(deviceResponseBytes: ByteArray)

Called when the remote mdoc device sends a response.