Skip to content

VDNfcScanner

Entry point class to the Nfc SDK

Public Methods:

static void start(@NonNull IVDNfcScanner delegate, @NonNull Context context, VDNfcDocumentType document)

Starts the SDK

  • Parameters:

    • delegate: Delegate where to send the information gathered in this SDK.
    • context: Context needed to start an activity.
    • document: Document that will be read.
static void start(@NonNull IVDNfcScanner delegate, @NonNull Context context, VDNfcEnums.VDNfcDocumentType document, Map configuration) {

Starts the SDK

  • Parameters:

    • delegate: Delegate where to send the information gathered in this SDK.
    • context: Context needed to start an activity.
    • document: Document that will be read.
    • configuration: Configuration that the SDK will follow after starting, the non set keys will use default values.
static void startWithoutUI(@NonNull IVDNfcScanner delegate, @NonNull Context context, VDNfcEnums.VDNfcDocumentType document)

Starts the SDK without interface.

  • Parameters: - delegate: Delegate where to send the information gathered in this SDK. - context: Context needed to start an activity. - document: Document that will be read.
static void enableNfcActivity(@NonNull Activity activity)

(without UI mode) Enabled the activity to receive the NFC intent.

  • Parameters:

    • activity: Activity needed to read NFC.
static void disableNfcActivity(@NonNull Activity activity)

(without UI mode) Disabled the activity to receive the NFC intent.

  • Parameters:

    • activity: Activity needed to read NFC.
static void stop(@NonNull Context context)

Stops the framework.

  • Parameters:

    • context: Context to stop the framework.
static void setNfcKeysAndPins(String cardID, String dateOfBirth, String dateOfExpiry, List NfcKeys) {

Sets nfc pins, card ID, date of birth, date of expiry and sets nfc keys of the data to obtain from nfc chip.

  • Parameters:

    • cardID: Passport number or support number DNI 3.0 (NUM SOPORT)
    • dateOfBirth: date of birth with yyMMdd format.
    • dateOfExpiry: date of expiry with yyMMdd format.
    • NfcKeys: nfc key list which represents data to obtain from nfc chip.
static void setNfcKeysAndPins(NfcPins nfcPins, List NfcKeys)

Sets nfc pins, card ID, date of birth, date of expiry and sets nfc keys of the data to obtain from nfc chip.

  • Parameters:

    • nfcPins: nfc Pins.
    • NfcKeys: nfc key list which represents data to obtain from nfc chip.
static String getVersion()

Gets version of the SDK.

  • Returns:

    • Version of the SDK.
static void setNfcIntentAndStartReading(Intent intent)

(without UI mode) Sets nfc intent to read the chip.

  • Parameters:

    • intent: Nfc intent obtained from one activity when the chip is detected.
static List getNfcKeys()

Method used to ask the SDK for the possible nfc keys to obtain from nfc chip.

  • Returns:

    • Nfc key list which represents the possible text data to obtain from nfc chip.
static ArrayList getConfigurationKeys(Context context)

Gets configuration possible keys.

  • Parameters:

    • context: Application context.
  • Returns:

    • The configuration possible keys.
static boolean isStarted()

Checks if the framework is started.

  • Returns:

    • True if started, false otherwise.