Kofax Mobile SDK API Reference
|
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) |
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.
NFCTagReader | ( | ) |
|
protected |
|
protected |
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
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 | The NFCTagParameters object |
activity | The calling activity reference |
KmcRuntimeException | ErrorInfo#KMC_BC_BUSY |
Implements INFCTagReader.
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.
KmcRuntimeException | ErrorInfo#KMC_BC_BUSY |
IllegalArgumentException | (parameters cannot be null or empty) |
Implements INFCTagReader.