Introduction¶
IMPORTANT NOTE
This Android Compose product is not a new major version of the VDNfcScanner Android SDK, but the product redesigned in Kotlin and Jetpack Compose. It introduces significant changes and new capabilities compared to the previous implementation, but it does not maintain backward compatibility. To ensure a smooth transition, thoroughly test in development environments to validate integration and functionality.
Key Features of the Android NFC SDK
- Reads the contactless chip of ICAO 9303 identity documents (eMRTD): ID cards, residence permits and e-passports.
- Opens the chip's secure channel with PACE, falling back to BAC, and performs Chip Authentication and Active Authentication to detect cloned chips.
- Validates the document with Passive Authentication: every data group is checked against the Document Security Object (SOD), and its signer against a bundled CSCA master list.
- Accessible and user-friendly UI, with full customization options.
- Enhanced and more structured configuration management.
The NFC SDK is an Android library that reads the NFC chip of identity documents. It guides the user through the reading flow, asks for the data needed to open the chip (unless your app already provides it), reads the chip, verifies its authenticity and returns structured results and events for integration.
Flow¶
The NFC SDK guides the user through a clear reading flow:
- Instructions: The SDK explains how to hold the document against the phone. This screen can be hidden with instructionsShow.
- Document data: To open the chip, the SDK needs the document number, the date of birth and the date of expiry. The user enters them in a form, or the SDK skips the form when your app provides them through prefill (for example, from the OCR of a previous document capture).
- Chip reading: The user holds the document against the back of the phone, over its NFC antenna, until the reading finishes.
- Completion: The SDK verifies the authenticity of the chip and returns the results to the host app.
If the reading fails (the document was not detected, it was moved too early, or the chip could not be read completely), the SDK shows a feedback screen that lets the user try again. If the document data is wrong, the SDK goes back to the form so the user can correct it.
If the device has NFC but it is switched off, the SDK shows a screen that takes the user to the device settings to turn it on.
Document type¶
The SDK reads documents that follow the ICAO 9303 eMRTD standard, such as the Spanish DNIe 3.0 and 4.0, residence permits and e-passports. You can find the complete list of documents here: Documents.
The document type does not need to be configured: the SDK reads any supported document from the data stored in its chip.
Documents that partially follow ICAO 9303
The SDK relies on the ICAO 9303 standard. Some documents only follow it partially (for example, with a malformed or incomplete data group, or with a chip that does not answer as the standard expects), and they may not be read correctly or may fail the authenticity checks. Test the documents your users will read before going to production.
Opening the chip with a CAN
The chip is usually opened with the document number, the date of birth and the date of expiry. Documents that have a Card Access Number (CAN) can also be opened with it: set it in prefill, or let the user switch to the CAN when the document data is rejected.