Skip to content

FAQs & Known issues

FAQs

Which Android versions and devices are supported?

The SDK supports Android 10 (API level 29) and later on a physical device with an NFC reader. NFC is not available on the Android Emulator. See Specifications.

What permissions do I need to declare?

None. The SDK declares the NFC permission (and INTERNET, to load remote images) in its own manifest, and they are merged into your app's. No camera permission is needed.

If you want Google Play to offer your app only to devices with NFC, declare <uses-feature android:name="android.hardware.nfc" android:required="true" /> in your manifest. See Installation and Specifications.

How do I integrate the SDK?

The SDK is integrated using the provided .aar libraries, together with the third-party dependencies it needs (JMRTD, SCUBA, Bouncy Castle and JJ2000, among others). See Installation.

Why does the SDK not start after integration?

The most common causes are:

  • The device has no NFC reader, or the app runs on the Emulator. The SDK finishes with nfcUnavailable.
  • A malformed or invalid NfcReadConfiguration. The SDK finishes with the configuration error. A configuration that cannot be decoded from the JSON fails before the SDK is started.
  • Missing bundled JSON files when loading the configuration from the app assets.
  • A missing or incompatible dependency, which shows up as a NoClassDefFoundError or a NoSuchMethodError. See the tested versions in Installation.
  • A duplicated META-INF/versions/9/OSGI-INF/MANIFEST.MF file when building. See Installation.

If startup fails, check the error received in onNfcReadFinished(error), including its info, and any event reported through onNfcReadEvent(event). See API and Configuration.

How do I start the SDK?

The standard flow is:

  1. Create an NfcReadConfiguration.
  2. Call NfcRead.start(listener, configuration, context).
  3. Optionally set an NfcReadEventsListener with NfcRead.setEventsListener(listener).

See API and Installation for examples.

Do I have to set the listeners again for each reading?

Yes. The SDK releases both listeners when the flow finishes, so set them again every time you call NfcRead.start.

Can I build the configuration in code instead of JSON?

Yes. NfcReadConfiguration is a @Serializable data class, so it can be:

  • Built directly in Kotlin code.
  • Decoded from a JSON file.

Both approaches are supported. See Installation.

What happens if a configuration field is missing?

If a property is omitted, the SDK uses the documented default value for that field.

If a property is present but has an unsupported value, configuration validation fails and the SDK does not start. See Configuration.

Can I skip the document data form?

Yes. Provide the document number, the date of birth and the date of expiry in setup.prefill, with the dates in MRZ format yyMMdd, or provide the CAN. When they are present, the form is skipped and the reading starts right away.

If the prefilled data is wrong, the chip rejects it and the SDK shows the form so the user can correct it. See prefill.

Why is my prefill ignored?

The prefill is only used when the three document values (documentNumber, dateOfBirth and dateOfExpiry) are all present and well formed, or when the CAN is present and has six digits. The dates must be real days in MRZ format (for example 860816, not 1986-08-16). A value with a wrong format is ignored and the form is shown, filled in with the values that are valid. A value with a good format that is not the one of the document is not ignored: the chip rejects it and the SDK shows the form with the data filled in. See prefill.

Why does keysData only contain the photos?

The SDK only returns the data fields listed in setup.keys. If keys is not set or is empty, keysData carries no text field, only the photos (cut_photo and signature), which are always returned when read. List the fields you need, or pass the nfcKeys returned by the Veridas services. Keys are case-sensitive and an unknown key is ignored. See keys.

Can I read a document using the CAN?

Yes. Set the CAN in setup.prefill to open the chip with it. The user can also switch to the CAN from the form that appears when the document data is rejected. See prefill.

Can I customize texts, styles, and media?

Yes. The SDK configuration is organized into four top-level areas:

  • setup
  • texts
  • styles
  • medias

This structure lets you separate behavior, wording, visual customization, and assets. See Customization and Migration guide.

Can I customize the texts of the date picker?

Yes. The select and cancel buttons of the calendar opened from the date fields, and the alternative texts of its four arrows, are in texts.common.calendar (acceptButton, cancelButton, altTextMonthLeftArrowIcon, altTextMonthRightArrowIcon, altTextYearLeftArrowIcon and altTextYearRightArrowIcon). See texts.

Do I need to provide all texts if I want a custom language?

Yes. If you want to support a language other than the built-in defaults, you should provide the full custom texts configuration.

The built-in default languages are Spanish and English. See Configuration and Customization.

Can I hide the instructions screen?

Yes, using setup.instructionsShow = false.

However, this is only recommended if your app already explains how to read the document with NFC before the SDK starts. See instructionsShow.

Can I hide the SDK close button?

Yes, using setup.closeButtonShow = false.

That said, keeping the built-in close button visible is recommended unless your integration already provides a clear and reliable exit mechanism, such as calling NfcRead.stop(). See closeButtonShow.

How many times can the user retry the reading?

By default, the user can retry a failed reading 3 times, so up to 4 attempts in total. Change it with setup.maxRetries. Wrong document data uses a retry too, and so does an attempt in which no document is detected for 60 seconds. Sending the app to the background does not. See maxRetries.

Can I trust a result delivered by the SDK?

The SDK only delivers results for documents that passed every authenticity check it could perform: Passive Authentication and, when the document supports them, Chip Authentication or Active Authentication. A document that fails any of them is not delivered, and the SDK finishes with the corresponding error.

Check authentication in the result to see which anti-cloning check ran. If both chipAuthentication and activeAuthentication are NOT_PERFORMED, the document does not support either of them. See Results.

How do I receive SDK lifecycle events?

Implement:

  • NfcReadListener for result and lifecycle callbacks.
  • NfcReadEventsListener for optional tracking events through onNfcReadEvent(event).

See API.

What is the difference between onNfcReadResults and onNfcReadEvent?

  • onNfcReadResults(results) provides the final successful SDK result.
  • onNfcReadEvent(event) provides intermediate lifecycle and tracking events generated during the flow.

Use onNfcReadResults for business completion logic and onNfcReadEvent for logging, analytics, or debugging. See API.

Do I need to add ProGuard or R8 rules?

No. The SDK includes its own consumer rules, which are applied when you build your app.

Known issues

The position of the NFC antenna depends on the phone

Unlike other platforms, Android phones do not have the antenna in a standard place. If the document is not detected, the user may need to move it slowly along the back of the phone. Tell the user so in the instructions. See UX Recommendations.

Invalid configuration values fail at runtime

The SDK validates the received configuration when starting. If a property has an unsupported value, the SDK does not start instead of silently ignoring the issue.

This is expected behavior. Validate custom JSON carefully before shipping it. See Configuration and API.

Hiding instructional UI can reduce usability

Disabling elements such as the instructions screen may negatively affect comprehension and accessibility, and increase the number of failed readings.

If these elements are hidden, the host application should provide an equivalent user guidance experience. See Accessibility.