NfcTravelDocumentReader

NFC Travel Document Reader component.

Types

Link copied to clipboard
class AccessControlException(message: String, cause: Throwable, debugInfo: DebugInfo) : NfcTravelDocumentReader.ReadException

Thrown if access to the chip data is denied either by PACE or BAC protocol.

Link copied to clipboard

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

Link copied to clipboard

Thrown if Chip Authentication protocol fails. Secure connection was not established.

Link copied to clipboard
data class Configuration(val authorityCertificates: Set<X509Certificate> = emptySet(), val timeoutMillis: Int = DEFAULT_TIMEOUT_MILLIS, val sessionToken: String? = null, 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
class NotConnectedException(message: String, cause: Throwable, debugInfo: DebugInfo) : NfcTravelDocumentReader.ReadException

Thrown if NFC reading fails due to an NFC tag connection failure.

Link copied to clipboard
open class ReadException(message: String, cause: Throwable, debugInfo: DebugInfo) : RuntimeException

Thrown if NFC reading fails due to an unexpected reason.

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, password: Password, activeAuthenticationChallenge: ByteArray? = null): NfcTravelDocumentReaderResult
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.