NfcTravelDocumentReader

NFC Travel Document Reader component.

Types

Link copied to clipboard

Interface for handling the start of access establishment, such as BAC/PACE method.

Link copied to clipboard
data class Configuration @JvmOverloads constructor(val authorityCertificates: Set<X509Certificate> = emptySet(), val timeoutMillis: Int = DEFAULT_TIMEOUT_MILLIS, isDebugInfoEnabled: Boolean = false)

Configuration for the NFC Travel Document Reader component.

Link copied to clipboard

Interface for handling the start of data authentication.

Interface for handling the progress update during Elementary Files reading.

Link copied to clipboard
fun interface FailedListener

Interface for handling a failure of the reading process.

Link copied to clipboard
class Listeners(val succeededListener: NfcTravelDocumentReader.SucceededListener, val failedListener: NfcTravelDocumentReader.FailedListener, val accessEstablishmentStartedListener: NfcTravelDocumentReader.AccessEstablishmentStartedListener = noopAccessEstablishmentStartedListener, val elementaryFilesReadingProgressUpdatedListener: NfcTravelDocumentReader.ElementaryFilesReadingProgressUpdatedListener = noopElementaryFilesReadingProgressUpdatedListener, val dataAuthenticationStartedListener: NfcTravelDocumentReader.DataAuthenticationStartedListener = noopDataAuthenticationStartedListener)

Listeners for the NFC travel document reading process.

Link copied to clipboard
fun interface SucceededListener

Interface for handling the successful completion of the NFC travel document reading process.

Functions

Link copied to clipboard
abstract fun cancel()

Cancels the ongoing reading process that was initiated by the read method.

Link copied to clipboard
abstract fun read(tag: Tag, nfcKey: NfcKey, activeAuthenticationChallenge: ByteArray? = null): TravelDocument
abstract fun read(tag: Tag, nfcKey: NfcKey, activeAuthenticationChallenge: ByteArray? = null, listeners: NfcTravelDocumentReader.Listeners)

abstract fun read(tag: Tag, password: Password, activeAuthenticationChallenge: ByteArray? = null): TravelDocument
abstract fun read(tag: Tag, password: Password, activeAuthenticationChallenge: ByteArray? = null, listeners: NfcTravelDocumentReader.Listeners)

Read travel document. First it executes appropriate access control method (BAC/PACE). Then it authenticates data and chip, and finally it returns travel document created from read Data Groups. This operation should be called on a background thread. Ongoing reading can be canceled by invoking the cancel method.