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
object Companion
Link copied to clipboard
data class Configuration @JvmOverloads constructor(val authorityCertificates: Set<X509Certificate> = emptySet(), val timeoutMillis: Int = DEFAULT_TIMEOUT_MILLIS, debugInfoEnabled: 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)
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 read(tag: Tag, nfcKey: NfcKey): TravelDocument
abstract fun read(tag: Tag, nfcKey: NfcKey, activeAuthenticationChallenge: ByteArray?): TravelDocument

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.

abstract fun read(tag: Tag, nfcKey: NfcKey, listeners: NfcTravelDocumentReader.Listeners)
abstract fun read(tag: Tag, nfcKey: NfcKey, activeAuthenticationChallenge: ByteArray?, listeners: NfcTravelDocumentReader.Listeners)