Nfc Scanner

Defined in package com.scandit.datacapture.id.nfc

NfcScanner
class NfcScanner

Added in version 7.3.0

A class that provides functionality to read NFC chips embedded in identity documents. It supports reading from various types of documents including passports, ID cards, and visas.

NfcScanner()
NfcScanner(activity: ComponentActivity)

Added in version 7.3.0

Creates a new NfcScanner instance.

newInstance(activity)
fun NfcScanner.newInstance(activity: ComponentActivity): NfcScanner

Added in version 7.3.0

Creates a new instance of the NfcScanner.

captureNfcFrom(capturedId)
fun captureNfcFrom(capturedId: CapturedId): NFCFlowBuilder

Added in version 7.3.0

Creates a builder to configure and start the NFC reading flow for a captured ID.

NFCFlowBuilder
class NFCFlowBuilder

Added in version 7.3.0

A builder class to configure and start the NFC reading flow.

onSuccess(callback)
fun onSuccess(callback: ((CapturedId) -> Unit)): NFCFlowBuilder

Added in version 7.3.0

Sets the callback to be invoked when NFC reading succeeds.

onFailure(callback)
fun onFailure(callback: (() -> Unit)): NFCFlowBuilder

Added in version 7.3.0

Sets the callback to be invoked when NFC reading fails.

onSkipped(callback)
fun onSkipped(callback: (() -> Unit)): NFCFlowBuilder

Added in version 7.3.0

Sets the callback to be invoked when NFC reading is skipped.

start()
fun start()

Added in version 7.3.0

Starts the NFC reading flow with the configured callbacks.