NFC Passport Reader
Scan passport and retrieve information using NFC technologies.
BiometridStandard.getInstance().startNfc(processCallback, nfcCustomization, scannerCustomization);aBiometridStandard.getInstance().startNfc(processCallback, documentMrz, scannerCustomization);aImplementation Example
class ExampleActivity extends AppCompatActivity implements InitializationCallback{
String TAG = getClass().getSimpleName();
String BIOMETRID_API_SERVER_URL = "your server URL";
String BIOMETRID_APP = "your app";
String BIOMETRID_CREDENTIAL = "your credential";
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
BiometridStandard.getInstance().init(
BIOMETRID_API_SERVER_URL ,
BIOMETRID_APP,
BIOMETRID_ONBIOMETRID_CREDENTIAL,
Language.English,
this);
}
@Override
public void initializationCallback(boolean status, @Nullable Errors errors) {
if(status) startNfc();
}
public void startNfc() {
BiometridStandard.getInstance().startNfc(
processCallback,
new NFCustomization(),
new CaptureOptions()
);
}
public void startNfcWithoutMRZReader() {
BiometridStandard.getInstance().startNfc(
processCallback,
new MrzData("document_number","birth_date","expiry_date"),
new NFCustomization()
);
}
private ProcessCallback processCalback = new ProcessCallback() {
@Override
public void nfcCallback(@Nullable NFCData document, @Nullable Errors errors) {
if (errors != null) {
Log.e(TAG, "nfcCallback -> error: " + errors.getMessage());
} else {
Log.d(TAG, "nfcCallback -> passport information: " + document.toString());
}
};
}Callback params
Was this helpful?