Kofax Mobile SDK API Reference
Classes | Public Member Functions | Protected Member Functions | List of all members
NFCTagReader Class Reference
Inheritance diagram for NFCTagReader:
INFCTagReader

Public Member Functions

 NFCTagReader ()
 
void readTag (final NFCTagParameters parameters, Activity activity)
 
void verifyDocumentSignerCertificate (byte[] documentSecurityObject, String masterListFilePath, final ICompletionListener< Boolean > completionListener)
 

Protected Member Functions

void onTagRead (NFCTagParameters parameters, ITagData tagData, Exception exception)
 
void onComplete (ICompletionListener< Boolean > completionListener, Boolean isCertificateVerified, Exception exception)
 

Detailed Description

NFC tag reader.

This class is used to read the data from NFC tag available on passport documents. Near Field Communication (NFC) should be available on the device to use this feature.

Constructor & Destructor Documentation

◆ NFCTagReader()

Member Function Documentation

◆ onComplete()

void onComplete ( ICompletionListener< Boolean >  completionListener,
Boolean  isCertificateVerified,
Exception  exception 
)
protected

◆ onTagRead()

void onTagRead ( NFCTagParameters  parameters,
ITagData  tagData,
Exception  exception 
)
protected

◆ readTag()

void readTag ( final NFCTagParameters  parameters,
Activity  activity 
)

It is required to have image capture license before calling this method.

This method is asynchronous and will call the listener within the parameters object.

This method is not re-entrant. An exception will be thrown if the method is entered while tag reading is outstanding.

API to get data from the NFC tag which is available on passport.

Here is an example of how to call this API from an Application Activity:


INFCTagReader tagReader = new NFCTagReader();
NFCTagParameters tagParameters = new NFCTagParameters("XXXXXXXXX", "YYMMDD", "YYMMDD", new INFCTagReadListener() {
@Override
public void onTagRead(ITagData tagData, Exception exception) {
if (exception == null) {
Log.e(TAG, tagData.getMRZInformation().getGivenNames());
} else {
Log.e(TAG, exception.getCause().toString());
}
}
}, new INFCTagDetectedListener() {
@Override
public void onTagDetected() {
Log.e(TAG, "TAG Detected");
}
});
tagReader.readTag(tagParameters, this);
Parameters
parametersThe NFCTagParameters object
activityThe calling activity reference
Exceptions
KmcRuntimeExceptionErrorInfo#KMC_BC_BUSY

Implements INFCTagReader.

◆ verifyDocumentSignerCertificate()

void verifyDocumentSignerCertificate ( byte[]  documentSecurityObject,
String  masterListFilePath,
final ICompletionListener< Boolean >  completionListener 
)

This API will be used to validate the DocumentSignerCertificate with the provided CSCA MasterList. The MasterListFilePath extension should be .ml (Ex: masterList.ml) This is relative path to assets folder or we can pass SD Card path also.

For Example:

If MasterList.ml exists in assets folder then masterListFilePath should be "MasterList.ml"

If MasterList.ml exists in device storage then masterListFilePath should be "/storage/emulated/0/MasterList.ml".

The completionListener will return Boolean true and Exception as null if Validation Successful. The completionListener will return Boolean false and an Exception (KMCRuntimeException) If Validation failed.

Exceptions
KmcRuntimeExceptionErrorInfo#KMC_BC_BUSY
IllegalArgumentException(parameters cannot be null or empty)

Implements INFCTagReader.


The documentation for this class was generated from the following file:
com.kofax.kmc.ken.engines.NFCTagReader.NFCTagReader
NFCTagReader()
Definition: NFCTagReader.java:32
com.kofax.kmc.ken.engines.NFCTagReader.onTagRead
void onTagRead(NFCTagParameters parameters, ITagData tagData, Exception exception)
Definition: NFCTagReader.java:136
Untitled Document © 2021 Kofax, Inc. All rights reserved. Use is subject to license terms.