Skip to content

RFID Chip Processing Configuration

General

  • Use the parameter to set the time limit (in seconds) for the RFID chip reading. After this duration, the reading process stops, regardless of the result. The countdown starts from the moment the RFID reading is started. Note that this is applicable only to Android.
DocumentReader.Instance().functionality().edit().setRfidTimeout(5).apply()
DocumentReader.Instance().functionality().edit().setRfidTimeout(5).apply();
DocumentReader.instance.functionality.rfidTimeout = 5;
DocumentReader.setFunctionality({ "rfidTimeout": 5 }, _ => { }, _ => { });
DocumentReader.setFunctionality({ "rfidTimeout": 5 });
DocumentReader.setFunctionality({ "rfidTimeout": 5 }, function (m) { }, function (e) { });
// Android
DocumentReader.Instance().Functionality().Edit().SetRfidTimeout(5).Apply();
  • The SDK can automatically change the scenario settings depending on the type and results obtained during the scanning of the last document. The default value is true:
DocReader.shared.rfidScenario.autoSettings = true
[RGLDocReader shared].rfidScenario.autoSettings = YES;
DocumentReader.Instance().rfidScenario().isAutoSettings = true
DocumentReader.Instance().rfidScenario().setAutoSettings(true);
DocumentReader.instance.rfidScenario.autoSettings = true;
DocumentReader.setRfidScenario({
    autoSettings: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    autoSettings: true
});
DocumentReader.setRfidScenario({
    autoSettings: true
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().AutoSettings = true;

// iOS
RGLDocReader.Shared.RfidScenario.AutoSettings = true;
  • Set an authentication procedure type, which should be conducted if all the objective conditions are met:
DocReader.shared.rfidScenario.authProcType = RFIDAuthenticationProcedureType.advanced
[RGLDocReader shared].rfidScenario.authProcType = RGLRFIDSdkProfilerTypeDoc9303Edition2006;
DocumentReader.Instance().rfidScenario().setAuthProcType(eRFID_AuthenticationProcedureType.aptAdvanced)
DocumentReader.Instance().rfidScenario().setAuthProcType(eRFID_AuthenticationProcedureType.aptAdvanced);
DocumentReader.instance.rfidScenario.authProcType = RFIDAuthenticationProcedureType.ADVANCED;
DocumentReader.setRfidScenario({
    authProcType: eRFID_AuthenticationProcedureType.aptAdvanced
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    authProcType: Enum.eRFID_AuthenticationProcedureType.aptAdvanced
});
DocumentReader.setRfidScenario({
    authProcType: DocumentReader.Enum.eRFID_AuthenticationProcedureType.aptAdvanced
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().AuthProcType = ERFID_AuthenticationProcedureType.AptAdvanced;

// iOS
RGLDocReader.Shared.RfidScenario.AuthProcType = RGLRFIDAuthenticationProcedureType.Advanced;
  • Set a type of priority mechanism for organizing an SM-channel (Security Messaging is a mechanism of protected data exchanging):
DocReader.shared.rfidScenario.baseSMProcedure = RFIDAccessControlProcedureType.bac
[RGLDocReader shared].rfidScenario.baseSMProcedure = RGLRFIDAccessControlProcedureTypeBac;
DocumentReader.Instance().rfidScenario().setBaseSMProcedure(eRFID_AccessControl_ProcedureType.ACPT_BAC)
DocumentReader.Instance().rfidScenario().setBaseSMProcedure(eRFID_AccessControl_ProcedureType.ACPT_BAC);
DocumentReader.instance.rfidScenario.baseSMProcedure = RFIDAccessControlProcedureType.BAC;
DocumentReader.setRfidScenario({
    baseSMProcedure: eRFID_AccessControl_ProcedureType.ACPT_BAC
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    baseSMProcedure: Enum.eRFID_AccessControl_ProcedureType.ACPT_BAC
});
DocumentReader.setRfidScenario({
    baseSMProcedure: DocumentReader.Enum.eRFID_AccessControl_ProcedureType.ACPT_BAC
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().BaseSMProcedure = ERFID_AccessControl_ProcedureType.AcptBac;

// iOS
RGLDocReader.Shared.RfidScenario.BaseSMProcedure = RGLRFIDAccessControlProcedureType.Bac;
  • Set a data access type for the PACE procedure:
DocReader.shared.rfidScenario.pacePasswordType = RFIDPasswordType.mrz
[RGLDocReader shared].rfidScenario.pacePasswordType = RGLRFIDPasswordTypeMrz;
DocumentReader.Instance().rfidScenario().setPacePasswordType(eRFID_Password_Type.PPT_MRZ)
DocumentReader.Instance().rfidScenario().setPacePasswordType(eRFID_Password_Type.PPT_MRZ);
DocumentReader.instance.rfidScenario.pacePasswordType = RFIDPasswordType.MRZ;
DocumentReader.setRfidScenario({
    pacePasswordType: eRFID_Password_Type.PPT_MRZ
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    pacePasswordType: Enum.eRFID_Password_Type.PPT_MRZ
});
DocumentReader.setRfidScenario({
    pacePasswordType: DocumentReader.Enum.eRFID_Password_Type.PPT_MRZ
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().PacePasswordType = ERFID_Password_Type.PptMrz;

// iOS
RGLDocReader.Shared.RfidScenario.PacePasswordType = RGLRFIDPasswordType.Mrz;
  • Set the MRZ value that will be used during the RFID chip processing:
DocReader.shared.rfidScenario.mrz = "MRZ_SECURITY_KEY"
[RGLDocReader shared].rfidScenario.mrz = @"MRZ_SECURITY_KEY";
DocumentReader.Instance().rfidScenario().setMrz("MRZ_SECURITY_KEY")
DocumentReader.Instance().rfidScenario().setMrz("MRZ_SECURITY_KEY");
DocumentReader.instance.rfidScenario.mrz = "MRZ_SECURITY_KEY";
DocumentReader.setRfidScenario({
    mrz: "MRZ_SECURITY_KEY"
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    mrz: "MRZ_SECURITY_KEY"
});
DocumentReader.setRfidScenario({
    mrz: "MRZ_SECURITY_KEY"
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().Mrz = "MRZ_SECURITY_KEY";

// iOS
RGLDocReader.Shared.RfidScenario.Mrz = "MRZ_SECURITY_KEY";
  • Set the hashed MRZ value (in uppercase) that will be used during the RFID chip processing:
DocReader.shared.rfidScenario.mrzHash = "HASHED_MRZ_SECURITY_KEY"
[RGLDocReader shared].rfidScenario.mrzHash = @"HASHED_MRZ_SECURITY_KEY";
DocumentReader.Instance().rfidScenario().setMrzHash("HASHED_MRZ_SECURITY_KEY")
DocumentReader.Instance().rfidScenario().setMrzHash("HASHED_MRZ_SECURITY_KEY");
DocumentReader.instance.rfidScenario.mrzHash = "HASHED_MRZ_SECURITY_KEY";
DocumentReader.setRfidScenario({
    mrzHash: "HASHED_MRZ_SECURITY_KEY"
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    mrzHash: "HASHED_MRZ_SECURITY_KEY"
});
DocumentReader.setRfidScenario({
    mrzHash: "HASHED_MRZ_SECURITY_KEY"
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().MrzHash = "HASHED_MRZ_SECURITY_KEY";

// iOS
RGLDocReader.Shared.RfidScenario.MrzHash = "HASHED_MRZ_SECURITY_KEY";
  • To start RFID chip processing, instead of the entire MRZ you can set three mandatory separate fields, such as document number, date of birth and date of expiry (both in YYMMDD format):
DocReader.shared.rfidScenario.documentNumber = "PA1234567"
DocReader.shared.rfidScenario.dateOfBirth = "041203"
DocReader.shared.rfidScenario.dateOfExpiry = "300504"
[RGLDocReader shared].rfidScenario.documentNumber = @"PA1234567";
[RGLDocReader shared].rfidScenario.dateOfBirth = @"041203";
[RGLDocReader shared].rfidScenario.dateOfExpiry = @"300504";
DocumentReader.Instance().rfidScenario().documentNumber("PA1234567")
DocumentReader.Instance().rfidScenario().dateOfBirth("041203")
DocumentReader.Instance().rfidScenario().dateOfExpiry("300504")
DocumentReader.Instance().rfidScenario().documentNumber("PA1234567");
DocumentReader.Instance().rfidScenario().dateOfBirth("041203");
DocumentReader.Instance().rfidScenario().dateOfExpiry("300504");
DocumentReader.instance.rfidScenario.documentNumber = "PA1234567";
DocumentReader.instance.rfidScenario.dateOfBirth = "041203";
DocumentReader.instance.rfidScenario.dateOfExpiry = "300504";
DocumentReader.setRfidScenario({
    documentNumber: "PA1234567",
    dateOfBirth: "041203",
    dateOfExpiry: "300504"
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    documentNumber: "PA1234567",
    dateOfBirth: "041203",
    dateOfExpiry: "300504"
});
DocumentReader.setRfidScenario({
    documentNumber: "PA1234567",
    dateOfBirth: "041203",
    dateOfExpiry: "300504"
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().DocumentNumber = "PA1234567";
DocumentReader.Instance().RfidScenario().DateOfBirth = "041203";
DocumentReader.Instance().RfidScenario().DateOfExpiry = "300504";

// iOS
RGLDocReader.Shared.RfidScenario.DocumentNumber = "PA1234567";
RGLDocReader.Shared.RfidScenario.DateOfBirth = "041203";
RGLDocReader.Shared.RfidScenario.DateOfExpiry = "300504";
  • Set the CAN value that will be used during the RFID chip processing:
DocReader.shared.rfidScenario.password = "CAN_VALUE"
[RGLDocReader shared].rfidScenario.password = @"CAN_VALUE";
DocumentReader.Instance().rfidScenario().setPassword("CAN_VALUE")
DocumentReader.Instance().rfidScenario().setPassword("CAN_VALUE");
DocumentReader.instance.rfidScenario.password = "CAN_VALUE";
DocumentReader.setRfidScenario({
    password: "CAN_VALUE"
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    password: "CAN_VALUE"
});
DocumentReader.setRfidScenario({
    password: "CAN_VALUE"
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().Password = "CAN_VALUE";

// iOS
RGLDocReader.Shared.RfidScenario.Password = "CAN_VALUE";
  • Set the EF.CardAccess content in Base64 string that will be used during the RFID chip processing:
DocReader.shared.rfidScenario.cardAccess = "BASE64_STRING"
[RGLDocReader shared].rfidScenario.cardAccess = @"BASE64_STRING";
DocumentReader.Instance().rfidScenario().setCardAccess("BASE64_STRING")
DocumentReader.Instance().rfidScenario().setCardAccess("BASE64_STRING");
DocumentReader.instance.rfidScenario.cardAccess = "BASE64_STRING";
DocumentReader.setRfidScenario({
    cardAccess: "BASE64_STRING"
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    cardAccess: "BASE64_STRING"
});
DocumentReader.setRfidScenario({
    cardAccess: "BASE64_STRING"
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().CardAccess = "BASE64_STRING";

// iOS
RGLDocReader.Shared.RfidScenario.CardAccess = "BASE64_STRING";
  • Set the size of the RFID reading buffer (standard or extended length):
DocReader.shared.rfidScenario.readingBuffer = RGLRFIDReadingBufferSizeExtendedLength
[RGLDocReader shared].rfidScenario.readingBuffer = RGLRFIDReadingBufferSizeExtendedLength;
DocumentReader.Instance().rfidScenario().setReadingBuffer(eRFIDReadingBufferSize.EXTENDED_LENGTH)
DocumentReader.Instance().rfidScenario().setReadingBuffer(eRFIDReadingBufferSize.EXTENDED_LENGTH);
DocumentReader.instance.rfidScenario.readingBuffer = eRFIDReadingBufferSize.EXTENDED_LENGTH;
DocumentReader.setRfidScenario({
    readingBuffer: eRFIDReadingBufferSizeIdentifier.EXTENDED_LENGTH
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    readingBuffer: eRFIDReadingBufferSizeIdentifier.EXTENDED_LENGTH
});
DocumentReader.setRfidScenario({
    readingBuffer: eRFIDReadingBufferSizeIdentifier.EXTENDED_LENGTH
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().ReadingBuffer = eRFIDReadingBufferSize.EXTENDED_LENGTH;

// iOS
RGLDocReader.Shared.RfidScenario.ReadingBuffer = Constants.RGLRFIDReadingBufferSizeExtendedLength;
  • Priority of using DS-certificates:
DocReader.shared.rfidScenario.pkdDSCertPriority = false
[RGLDocReader shared].rfidScenario.pkdDSCertPriority = NO;
DocumentReader.Instance().rfidScenario().isPkdDSCertPriority = false
DocumentReader.Instance().rfidScenario().setPkdDSCertPriority(false);
DocumentReader.instance.rfidScenario.pkdDSCertPriority = false;
DocumentReader.setRfidScenario({
    pkdDSCertPriority: false
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    pkdDSCertPriority: false
});
DocumentReader.setRfidScenario({
    pkdDSCertPriority: false
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().PkdDSCertPriority = false;

// iOS
RGLDocReader.Shared.RfidScenario.PkdDSCertPriority = false;
  • Use of CSCA-certificates submitted by individual data files only:
DocReader.shared.rfidScenario.pkdUseExternalCSCA = false
[RGLDocReader shared].rfidScenario.pkdUseExternalCSCA = NO;
DocumentReader.Instance().rfidScenario().isPkdUseExternalCSCA = false
DocumentReader.Instance().rfidScenario().setPkdUseExternalCSCA(false);
DocumentReader.instance.rfidScenario.pkdUseExternalCSCA = false;
DocumentReader.setRfidScenario({
    pkdUseExternalCSCA: false
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    pkdUseExternalCSCA: false
});
DocumentReader.setRfidScenario({
    pkdUseExternalCSCA: false
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().PkdUseExternalCSCA = false;

// iOS
RGLDocReader.Shared.RfidScenario.PkdUseExternalCSCA = false;
  • Level of trust to CSCA-certificates from PKD:
DocReader.shared.rfidScenario.trustedPKD = true
[RGLDocReader shared].rfidScenario.trustedPKD = YES;
DocumentReader.Instance().rfidScenario().isTrustedPKD = true
DocumentReader.Instance().rfidScenario().setTrustedPKD(true);
DocumentReader.instance.rfidScenario.trustedPKD = true;
DocumentReader.setRfidScenario({
    trustedPKD: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    trustedPKD: true
});
DocumentReader.setRfidScenario({
    trustedPKD: true
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().TrustedPKD = true;

// iOS
RGLDocReader.Shared.RfidScenario.TrustedPKD = true;
  • Logical sign of passive authentication performance:
DocReader.shared.rfidScenario.passiveAuth = true
[RGLDocReader shared].rfidScenario.passiveAuth = YES;
DocumentReader.Instance().rfidScenario().isPassiveAuth = true
DocumentReader.Instance().rfidScenario().setPassiveAuth(true);
DocumentReader.instance.rfidScenario.passiveAuth = true;
DocumentReader.setRfidScenario({
    passiveAuth: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    passiveAuth: true
});
DocumentReader.setRfidScenario({
    passiveAuth: true
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().PassiveAuth = true;

// iOS
RGLDocReader.Shared.RfidScenario.PassiveAuth = true;
  • Logical sign of a cancellation of an active authentication procedure (AA) after the successful performance of a chip authentication (CA) procedure:
DocReader.shared.rfidScenario.skipAA = false
[RGLDocReader shared].rfidScenario.skipAA = NO;
DocumentReader.Instance().rfidScenario().isSkipAA = false
DocumentReader.Instance().rfidScenario().setSkipAA(false);
DocumentReader.instance.rfidScenario.skipAA = false;
DocumentReader.setRfidScenario({
    skipAA: false
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    skipAA: false
});
DocumentReader.setRfidScenario({
    skipAA: false
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().SkipAA = false;

// iOS
RGLDocReader.Shared.RfidScenario.SkipAA = false;
  • Select the type of logical data profiler to use with an electronic document:
DocReader.shared.rfidScenario.profilerType = RGLRFIDSdkProfilerTypeDoc9303Edition2006
[RGLDocReader shared].rfidScenario.profilerType = RGLRFIDSdkProfilerTypeDoc9303Edition2006;
DocumentReader.Instance().rfidScenario().setProfilerType(eRFID_SDK_ProfilerType.SPT_DOC_9303_EDITION_2006)
DocumentReader.Instance().rfidScenario().setProfilerType(eRFID_SDK_ProfilerType.SPT_DOC_9303_EDITION_2006);
DocumentReader.instance.rfidScenario.profilerType = RFIDSDKProfilerType.DOC_9303_EDITION_2006;
DocumentReader.setRfidScenario({
    profilerType: eRFID_SDK_ProfilerType.SPT_DOC_9303_EDITION_2006
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    profilerType: Enum.eRFID_SDK_ProfilerType.SPT_DOC_9303_EDITION_2006
});
DocumentReader.setRfidScenario({
    profilerType: DocumentReader.Enum.eRFID_SDK_ProfilerType.SPT_DOC_9303_EDITION_2006
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().ProfilerType = ERFID_SDK_ProfilerType.SptDoc9303Edition2006;

// iOS
RGLDocReader.Shared.RfidScenario.ProfilerType = RGLRFIDSdkProfilerType.Edition2006;
  • Strict ISO protocol:
DocReader.shared.rfidScenario.strictProcessing = false
[RGLDocReader shared].rfidScenario.strictProcessing = NO;
DocumentReader.Instance().rfidScenario().isStrictProcessing = false
DocumentReader.Instance().rfidScenario().setStrictProcessing(false);
DocumentReader.instance.rfidScenario.strictProcessing = false;
DocumentReader.setRfidScenario({
    strictProcessing: false
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    strictProcessing: false
});
DocumentReader.setRfidScenario({
    strictProcessing: false
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().StrictProcessing = false;

// iOS
RGLDocReader.Shared.RfidScenario.StrictProcessing = false;
  • Specify whether to continue reading RFID chip data despite encountering potential ICAO critical errors. Defaults to false, also ignored if strictProcessing is set to true.
DocReader.shared.rfidScenario.proceedReadingAlways = true
[RGLDocReader shared].rfidScenario.proceedReadingAlways = YES;
DocumentReader.Instance().rfidScenario().isProceedReadingAlways = true
DocumentReader.Instance().rfidScenario().setProceedReadingAlways(true);
DocumentReader.instance.rfidScenario.proceedReadingAlways = true;
DocumentReader.setRfidScenario({
    proceedReadingAlways: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    proceedReadingAlways: true
});
DocumentReader.setRfidScenario({
    proceedReadingAlways: true
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().ProceedReadingAlways = true;

// iOS
RGLDocReader.Shared.RfidScenario.ProceedReadingAlways = true;
DocReader.shared.rfidScenario.mrzStrictCheck = true
[RGLDocReader shared].rfidScenario.mrzStrictCheck = @YES;
DocumentReader.Instance().rfidScenario().isMrzStrictCheck = true
DocumentReader.Instance().rfidScenario().setMrzStrictCheck(true);
DocumentReader.instance.rfidScenario.mrzStrictCheck = true;
DocumentReader.setRfidScenario({
    mrzStrictCheck: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    mrzStrictCheck: true
});
DocumentReader.setRfidScenario({
    mrzStrictCheck: true
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().MrzStrictCheck = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.RfidScenario.MrzStrictCheck = true;
  • Specify whether the ePassport must be read or not:
DocReader.shared.rfidScenario.readEPassport = true
[RGLDocReader shared].rfidScenario.readEPassport = YES;
DocumentReader.Instance().rfidScenario().isReadEPassport = true
DocumentReader.Instance().rfidScenario().setReadEPassport(true);
DocumentReader.instance.rfidScenario.readEPassport = true;
DocumentReader.setRfidScenario({
    readEPassport: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    readEPassport: true
});
DocumentReader.setRfidScenario({
    readEPassport: true
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().ReadEPassport = true;

// iOS
RGLDocReader.Shared.RfidScenario.ReadEPassport = true;
  • Specify the data groups of the ePassport that must be read:
DocReader.shared.rfidScenario.ePassportDataGroups.dG1 = true
[RGLDocReader shared].rfidScenario.ePassportDataGroups.dG1 = YES;
DocumentReader.Instance().rfidScenario().ePassportDataGroups().isDG1 = true
DocumentReader.Instance().rfidScenario().ePassportDataGroups().setDG1(true);
DocumentReader.instance.rfidScenario.ePassportDataGroups.dg1 = true;
DocumentReader.setRfidScenario({
    ePassportDataGroups: {
      DG1: true
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    ePassportDataGroups: {"DG1": true}
});
DocumentReader.setRfidScenario({
    ePassportDataGroups: {"DG1": true}
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().EPassportDataGroups().DG1 = true;

// iOS
RGLDocReader.Shared.RfidScenario.EPassportDataGroups.DG1 = true;
  • Specify whether the eID must be read or not:
DocReader.shared.rfidScenario.readEID = false
[RGLDocReader shared].rfidScenario.readEID = NO;
DocumentReader.Instance().rfidScenario().isReadEID = false
DocumentReader.Instance().rfidScenario().setReadEID(false);
DocumentReader.instance.rfidScenario.readEID = false;
DocumentReader.setRfidScenario({
    readEID: false
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    readEID: false
});
DocumentReader.setRfidScenario({
    readEID: false
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().ReadEID = false;

// iOS
RGLDocReader.Shared.RfidScenario.ReadEID = false;
  • Specify which data groups of the eID must be read:
DocReader.shared.rfidScenario.eIDDataGroups.dG1 = true
[RGLDocReader shared].rfidScenario.eIDDataGroups.dG1 = YES;
DocumentReader.Instance().rfidScenario().eIDDataGroups().isDG1 = true
DocumentReader.Instance().rfidScenario().eIDDataGroups().setDG1(true);
DocumentReader.instance.rfidScenario.eIDDataGroups.dg1 = true;
DocumentReader.setRfidScenario({
    eIDDataGroups: {
      DG1: true
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    eIDDataGroups: {"DG1": true}
});
DocumentReader.setRfidScenario({
    eIDDataGroups: {"DG1": true}
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().EIDDataGroups().DG1 = true;

// iOS
RGLDocReader.Shared.RfidScenario.EIDDataGroups.DG1 = true;
  • Specify whether the eDL must read or not:
DocReader.shared.rfidScenario.readEDL = true
[RGLDocReader shared].rfidScenario.readEDL = YES;
DocumentReader.Instance().rfidScenario().isReadEDL = true
DocumentReader.Instance().rfidScenario().setReadEDL(true);
DocumentReader.instance.rfidScenario.readEDL = true;
DocumentReader.setRfidScenario({
    readEDL: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    readEDL: true
});
DocumentReader.setRfidScenario({
    readEDL: true
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().ReadEDL = true;

// iOS
RGLDocReader.Shared.RfidScenario.ReadEDL = true;
  • Specify which data groups of the eDL must be read:
DocReader.shared.rfidScenario.eDLDataGroups.dG1 = true
[RGLDocReader shared].rfidScenario.eDLDataGroups.dG1 = YES;
DocumentReader.Instance().rfidScenario().eDLDataGroups().isDG1 = true
DocumentReader.Instance().rfidScenario().eDLDataGroups().setDG1(true);
DocumentReader.instance.rfidScenario.eDLDataGroups.dg1 = true;
DocumentReader.setRfidScenario({
    eDLDataGroups: {
      DG1: true
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    eDLDataGroups: {"DG1": true}
});
DocumentReader.setRfidScenario({
    eDLDataGroups: {"DG1": true}
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().EDLDataGroups().DG1 = true;

// iOS
RGLDocReader.Shared.RfidScenario.EDLDataGroups.DG1 = true;
  • Specify whether the DTC must be read or not:
DocReader.shared.rfidScenario.readDTC = true
[RGLDocReader shared].rfidScenario.readDTC = YES;
DocumentReader.Instance().rfidScenario().isReadDTC = true
DocumentReader.Instance().rfidScenario().setReadDTC(true);
DocumentReader.instance.rfidScenario.readDTC = true;
DocumentReader.setRfidScenario({
    readDTC: true
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    readDTC: true
});
DocumentReader.setRfidScenario({
    readDTC: true
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().ReadDTC = true;

// iOS
RGLDocReader.Shared.RfidScenario.ReadDTC = true;
  • Specify which data groups of the DTC must be read:
DocReader.shared.rfidScenario.DTCDataGroups.dG17 = true
[RGLDocReader shared].rfidScenario.DTCDataGroups.dG17 = YES;
DocumentReader.Instance().rfidScenario().DTCDataGroup().isDG17 = true
DocumentReader.Instance().rfidScenario().DTCDataGroup().setDG17(true);
DocumentReader.instance.rfidScenario.dtcDataGroups.dg17 = true;
DocumentReader.setRfidScenario({
    dtcDataGroups: {
      DG17: true
    }
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setRfidScenario({
    dtcDataGroups: {"DG17": true}
});
DocumentReader.setRfidScenario({
    dtcDataGroups: {"DG17": true}
}, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().RfidScenario().DTCDataGroup().DG17 = true;

// iOS
RGLDocReader.Shared.RfidScenario.DTCDataGroups.DG17 = true;

PKD Certificates

To use PKD certificates for the RFID chip processing, there are two options:

Prepare Certificates

For details, see the Master List reference information.

Add on Initialization

1. Load each local certificate file into the PKDCertificate object (using the corresponding PKDResourceType).

For details about the certificate objects PKDCertificate and their types PKDResourceType, see the API references below.

2. Add each PKDCertificate instance to a common object collection—further referred to as certificates.

See the example of parsing local certificate files to the list of the PKDResourceType objects:

if let url = Bundle.main.url(forResource: "certificate", withExtension: "pa"),
   let binaryData = try? Data(contentsOf: url) {
    // create RGLPKDCertificate object
    let pkdCertificate = PKDCertificate(
        binaryData: binaryData,
        resourceType: .certificate_PA,
        privateKey: nil
    )

    // add certificate object to collection
    var certificates = [PKDCertificate]()
    certificates.append(pkdCertificate)
}
NSURL *url = [[NSBundle mainBundle] URLForResource:@"certificate" withExtension:@"pa"];
NSData *binaryData = url ? [NSData dataWithContentsOfURL:url] : nil;

if (binaryData) {
    // create RGLPKDCertificate object
    RGLPKDCertificate *pkdCertificate = [[RGLPKDCertificate alloc]
        initWithBinaryData:binaryData
        resourceType:RGLPKDResourceTypeCertificate_PA
        privateKey:nil];

    // add certificate object to collection
    NSMutableArray<RGLPKDCertificate *> *certificates = [NSMutableArray array];
    [certificates addObject:pkdCertificate];
}
val stream = assets.open("Regula/pkd/certificate.pa")
val available = stream.available()
val binaryData = ByteArray(available)
stream.read(binaryData)

// create PKDCertificate object
val pkdCertificate = PKDCertificate(binaryData, PKDResourceType.CERTIFICATE_PA)

// add certificate object to collection
val certificates = mutableListOf<PKDCertificate>()
certificates.add(pkdCertificate)
InputStream stream = getAssets().open("Regula/pkd/certificate.pa");
int available = stream.available();
byte[] binaryData = new byte[available];
stream.read(binaryData);

// create PKDCertificate object
PKDCertificate pkdCertificate = new PKDCertificate(binaryData, PKDResourceType.CERTIFICATE_PA);

// add certificate object to collection
List<PKDCertificate> certificates = new ArrayList<>();
certificates.add(pkdCertificate);
var binaryData = await rootBundle.load("assets/pkd/certificate.pa");

// create PKDCertificate object
var pkdCertificate = PKDCertificate(
  binaryData,
  PKDResourceType.CERTIFICATE_PA,
);

// add certificate object to collection
var certificates = [pkdCertificate];

Android

var binaryData = default(byte[]);
using (var streamReader = new StreamReader(Platform.AppContext.Assets.Open("pkd/certificate.pa")))
{
    using var memstream = new MemoryStream();
    streamReader.BaseStream.CopyTo(memstream);
    binaryData = memstream.ToArray();
}

// create PKDCertificate object
var pkdCertificate = new PKDCertificate(binaryData, PKDResourceType.CertificatePa);

// add certificate object to collection
var certificates = new[] { pkdCertificate };

iOS

var binaryData = NSData.FromFile(NSBundle.MainBundle.PathForResource("pkd/certificate.pa", null));

// create PKDCertificate object
var pkdCertificate = new RGLPKDCertificate(binaryData, RGLPKDResourceType.Certificate_PA, null);

// add certificate object to collection
var certificates = new[] { pkdCertificate };

3. Add the collection of PKD certificates during the initialization process:

DocReader.shared.addPKDCertificates(certificates: certificates)
[RGLDocReader.shared addPKDCertificates:certificates];
DocumentReader.Instance().addPKDCertificates(certificates)
DocumentReader.Instance().addPKDCertificates(certificates);
DocumentReader.instance.addPKDCertificates(certificates);
DocumentReader.addPKDCertificates(certificates, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.addPKDCertificates(certificates)
DocumentReader.addPKDCertificates(certificates, function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().AddPKDCertificates(certificates);

// iOS
RGLDocReader.Shared.AddPKDCertificates(certificates);

4. Start the RFID chip processing. For details, see the RFID Chip Processing reference information.

Add at Runtime

To add a list of PKD certificates when the RFID reading is started, use the following code. Note that all interfaces in the callback are optional, but having at least one is required.

// Assign RGLDocReaderRFIDDelegate class first
DocReader.shared.rfidDelegate = self

// Then implement RGLDocReaderRFIDDelegate optional methods
func onRequestPACertificates(withSerial serialNumber: Data!,
                             issuer: PAResourcesIssuer!,
                             callback: RFIDCertificatesCallback!) {
    if let url = Bundle.main.url(forResource: "certificate", withExtension: "pa"),
       let binaryData = try? Data(contentsOf: url) {

        let pkdCertificate = PKDCertificate(
            binaryData: binaryData,
            resourceType: .certificate_PA,
            privateKey: nil
        )
        callback([pkdCertificate])
    }
}

func onRequestTACertificates(withKey keyCAR: String!,
                             callback: RFIDCertificatesCallback!) {
    if let url = Bundle.main.url(forResource: "certificate", withExtension: "pa"),
       let binaryData = try? Data(contentsOf: url) {

        let pkdCertificate = PKDCertificate(
            binaryData: binaryData,
            resourceType: .certificate_TA,
            privateKey: nil
        )
        callback([pkdCertificate])
    }
}

func onRequestTASignature(with challenge: TAChallenge!,
                          callback: ((Data?) -> Void)!) {
    if let url = Bundle.main.url(forResource: "certificate", withExtension: "pa"),
       let binaryData = try? Data(contentsOf: url) {
        callback(binaryData)
    }
}
// Assign RGLDocReaderRFIDDelegate class first
[RGLDocReader shared].rfidDelegate = self;

// Then implement RGLDocReaderRFIDDelegate optional methods

- (void)onRequestPACertificatesWithSerial:(NSData *)serialNumber
                                   issuer:(RGLPAResourcesIssuer *)issuer
                                 callback:(RGLRFIDCertificatesCallback)callback {

  NSURL *url = [[NSBundle mainBundle] URLForResource:@"certificate" withExtension:@"pa"];
  NSData *binaryData = url ? [NSData dataWithContentsOfURL:url] : nil;

  if (binaryData) {
    RGLPKDCertificate *pkdCertificate = [[RGLPKDCertificate alloc] initWithBinaryData:binaryData
                                                                         resourceType:RGLPKDResourceTypeCertificate_PA
                                                                           privateKey:nil];

    callback(@[pkdCertificate]);
  }
}

- (void)onRequestTACertificatesWithKey:(NSString *)keyCAR
                              callback:(RGLRFIDCertificatesCallback)callback {

  NSURL *url = [[NSBundle mainBundle] URLForResource:@"certificate" withExtension:@"pa"];
  NSData *binaryData = url ? [NSData dataWithContentsOfURL:url] : nil;

  if (binaryData) {
    RGLPKDCertificate *pkdCertificate =
    [[RGLPKDCertificate alloc] initWithBinaryData:binaryData
                                     resourceType:RGLPKDResourceTypeCertificate_TA
                                       privateKey:nil];

    callback(@[pkdCertificate]);
  }
}

- (void)onRequestTASignatureWithChallenge:(RGLTAChallenge *)challenge
                                 callback:(void(^)(NSData *signature))callback {
  NSURL *url = [[NSBundle mainBundle] URLForResource:@"certificate" withExtension:@"pa"];
  NSData *binaryData = url ? [NSData dataWithContentsOfURL:url] : nil;

  if (binaryData) {
    callback(binaryData);
  }
}
DocumentReader.Instance().startRFIDReader(context, object : IRfidReaderCompletion() {
        override fun onCompleted(
            action: Int,
            results: DocumentReaderResults?,
            error: DocumentReaderException?
        ) {
            // Completed RFID chip processing
        }
    }, IRfidReaderRequest(object : IRfidPACertificates {
        override fun onRequestPACertificates(
            serialNumber: ByteArray?,
            issuer: PAResourcesIssuer?,
            completion: IRfidPKDCertificateCompletion
        ) {
            // get certificate in background thread

            val stream: InputStream = AssetsUtil.getAssets().open("Regula/pkd/certificate.pa")
            val available = stream.available()
            val binaryData = ByteArray(available)
            stream.read(binaryData)

            val pkdCertificate = PKDCertificate(binaryData, PKDResourceType.CERTIFICATE_PA)

            completion.onCertificatesReceived(arrayOf<PKDCertificate>(pkdCertificate))
        }
    }, object : IRfidTACertificates {
        override fun onRequestTACertificates(
            keyCAR: String?,
            completion: IRfidPKDCertificateCompletion
        ) {
            // get certificate in background thread

            val stream: InputStream = AssetsUtil.getAssets().open("Regula/pkd/certificate.pa")
            val available = stream.available()
            val binaryData = ByteArray(available)
            stream.read(binaryData)

            val pkdCertificate = PKDCertificate(binaryData, PKDResourceType.CERTIFICATE_TA)


            completion.onCertificatesReceived(arrayOf<PKDCertificate>(pkdCertificate))
        }
    }, object : IRfidTASignature {
        override fun onRequestTASignature(
            challenge: TAChallenge?,
            completion: IRfidTASignatureCompletion
        ) {
            // get certificate in background thread

            val stream: InputStream = AssetsUtil.getAssets().open("Regula/pkd/certificate.pa")
            val available = stream.available()
            val binaryData = ByteArray(available)
            stream.read(binaryData)

            completion.onSignatureReceived(binaryData)
        }
    }
    ))
DocumentReader.Instance().startRFIDReader(context, new IRfidReaderCompletion() {
        @Override
        public void onCompleted(int action, @Nullable DocumentReaderResults results, @Nullable DocumentReaderException error) {
            // Completed RFID chip processing
        }
    }, new IRfidReaderRequest(new IRfidPACertificates() {
        @Override
        public void onRequestPACertificates(@Nullable byte[] serialNumber, @Nullable PAResourcesIssuer issuer, @NonNull IRfidPKDCertificateCompletion completion) {
            // get certificate in background thread

            InputStream stream = getAssets().open("Regula/pkd/certificate.pa");
            int available = stream.available();
            byte[] binaryData = new byte[available];
            stream.read(binaryData);

            PKDCertificate pkdCertificate = new PKDCertificate(binaryData, PKDResourceType.CERTIFICATE_PA);

            completion.onCertificatesReceived(new PKDCertificate[] {pkdCertificate});

        }
    }, new IRfidTACertificates() {
        @Override
        public void onRequestTACertificates(@Nullable String keyCAR, @NonNull IRfidPKDCertificateCompletion completion) {
            // get certificate in background thread

            InputStream stream = getAssets().open("Regula/pkd/certificate.pa");
            int available = stream.available();
            byte[] binaryData = new byte[available];
            stream.read(binaryData);

            PKDCertificate pkdCertificate = new PKDCertificate(binaryData, PKDResourceType.CERTIFICATE_TA);


            completion.onCertificatesReceived(new PKDCertificate[] {pkdCertificate});
        }
    }, new IRfidTASignature() {
        @Override
        public void onRequestTASignature(@Nullable TAChallenge challenge, @NonNull IRfidTASignatureCompletion completion) {
            // get certificate in background thread

            InputStream stream = getAssets().open("Regula/pkd/certificate.pa");
            int available = stream.available();
            byte[] binaryData = new byte[available];
            stream.read(binaryData);

            completion.onSignatureReceived(binaryData);
        }
    }
    ));
var config = RFIDConfig((action, results, error) {
  // Completed RFID chip processing
});

config.onRequestPACertificates = (serialNumber, issuer, request) async {
  var binaryData = await rootBundle.load("assets/pkd/certificate.pa");
  var pkdCertificate = PKDCertificate(
    binaryData,
    PKDResourceType.CERTIFICATE_PA,
  );
  request([pkdCertificate]);
};

config.onRequestTACertificates = (keyCAR, request) async {
  var binaryData = await rootBundle.load("assets/pkd/certificate.pa");
  var pkdCertificate = PKDCertificate(
    binaryData,
    PKDResourceType.CERTIFICATE_TA,
  );
  request([pkdCertificate]);
};

config.onRequestTASignature = (challenge, request) async {
  var binaryData = await rootBundle.load("assets/pkd/certificate.pa");
  request(binaryData);
};

DocumentReader.instance.rfid(config);

Android

public class MainActivity : MauiAppCompatActivity
{
    protected override void OnCreate(Bundle savedInstanceState)
    {
        base.OnCreate(savedInstanceState);
        DocumentReader.Instance().StartRFIDReader(Platform.AppContext, new RfidReaderCompletion(), new IRfidReaderRequest(new RfidPACertificates(), new RfidTACertificates(), new RfidTASignature()));
    }
}

class RfidReaderCompletion : IRfidReaderCompletion
{
    public override void OnCompleted(int action, DocumentReaderResults results, DocumentReaderException error)
    {
        // Completed RFID chip processing
    }
}

class RfidPACertificates : IRfidPACertificates
{
    public void OnRequestPACertificates(byte[] serialNumber, PAResourcesIssuer issuer, IRfidPKDCertificateCompletion completion)
    {
        var binaryData = default(byte[]);
        using (var streamReader = new StreamReader(Platform.AppContext.Assets.Open("pkd/certificate.pa")))
        {
            using var memstream = new MemoryStream();
            streamReader.BaseStream.CopyTo(memstream);
            binaryData = memstream.ToArray();
        }
        var pkdCertificate = new PKDCertificate(binaryData, PKDResourceType.CertificatePa);
        completion.OnCertificatesReceived([pkdCertificate]);
    }

    public nint Handle => throw new NotImplementedException();
    public int JniIdentityHashCode => throw new NotImplementedException();
    public JniObjectReference PeerReference => throw new NotImplementedException();
    public JniPeerMembers JniPeerMembers => throw new NotImplementedException();
    public JniManagedPeerStates JniManagedPeerState => throw new NotImplementedException();
    public void Dispose() { throw new NotImplementedException(); }
    public void Disposed() { throw new NotImplementedException(); }
    public void DisposeUnlessReferenced() { throw new NotImplementedException(); }
    public void Finalized() { throw new NotImplementedException(); }
    public void SetJniIdentityHashCode(int value) { throw new NotImplementedException(); }
    public void SetJniManagedPeerState(JniManagedPeerStates value) { throw new NotImplementedException(); }
    public void SetPeerReference(JniObjectReference reference) { throw new NotImplementedException(); }
    public void UnregisterFromRuntime() { throw new NotImplementedException(); }
}

class RfidTACertificates : IRfidTACertificates
{
    public void OnRequestTACertificates(string keyCAR, IRfidPKDCertificateCompletion completion)
    {
        var binaryData = default(byte[]);
        using (var streamReader = new StreamReader(Platform.AppContext.Assets.Open("pkd/certificate.pa")))
        {
            using var memstream = new MemoryStream();
            streamReader.BaseStream.CopyTo(memstream);
            binaryData = memstream.ToArray();
        }
        var pkdCertificate = new PKDCertificate(binaryData, PKDResourceType.CertificateTa);
        completion.OnCertificatesReceived([pkdCertificate]);
    }

    public nint Handle => throw new NotImplementedException();
    public int JniIdentityHashCode => throw new NotImplementedException();
    public JniObjectReference PeerReference => throw new NotImplementedException();
    public JniPeerMembers JniPeerMembers => throw new NotImplementedException();
    public JniManagedPeerStates JniManagedPeerState => throw new NotImplementedException();
    public void Dispose() { throw new NotImplementedException(); }
    public void Disposed() { throw new NotImplementedException(); }
    public void DisposeUnlessReferenced() { throw new NotImplementedException(); }
    public void Finalized() { throw new NotImplementedException(); }
    public void SetJniIdentityHashCode(int value) { throw new NotImplementedException(); }
    public void SetJniManagedPeerState(JniManagedPeerStates value) { throw new NotImplementedException(); }
    public void SetPeerReference(JniObjectReference reference) { throw new NotImplementedException(); }
    public void UnregisterFromRuntime() { throw new NotImplementedException(); }
}

class RfidTASignature : IRfidTASignature
{
    public void OnRequestTASignature(TAChallenge challenge, IRfidTASignatureCompletion completion)
    {
        var binaryData = default(byte[]);
        using (var streamReader = new StreamReader(Platform.AppContext.Assets.Open("pkd/certificate.pa")))
        {
            using var memstream = new MemoryStream();
            streamReader.BaseStream.CopyTo(memstream);
            binaryData = memstream.ToArray();
        }
        completion.OnSignatureReceived(binaryData);
    }

    public nint Handle => throw new NotImplementedException();
    public int JniIdentityHashCode => throw new NotImplementedException();
    public JniObjectReference PeerReference => throw new NotImplementedException();
    public JniPeerMembers JniPeerMembers => throw new NotImplementedException();
    public JniManagedPeerStates JniManagedPeerState => throw new NotImplementedException();
    public void Dispose() { throw new NotImplementedException(); }
    public void Disposed() { throw new NotImplementedException(); }
    public void DisposeUnlessReferenced() { throw new NotImplementedException(); }
    public void Finalized() { throw new NotImplementedException(); }
    public void SetJniIdentityHashCode(int value) { throw new NotImplementedException(); }
    public void SetJniManagedPeerState(JniManagedPeerStates value) { throw new NotImplementedException(); }
    public void SetPeerReference(JniObjectReference reference) { throw new NotImplementedException(); }
    public void UnregisterFromRuntime() { throw new NotImplementedException(); }
}

iOS

public class Main
{
    MyDelegate reference = new();
    public Main()
    {
        RGLDocReader.Shared.RfidDelegate = reference;
    }
}

public class MyDelegate : RGLDocReaderRFIDDelegate
{
    override public void OnRequestPACertificatesWithSerial(NSData serialNumber, RGLPAResourcesIssuer issuer, RGLRFIDCertificatesCallback callback)
    {
        var binaryData = NSData.FromFile(NSBundle.MainBundle.PathForResource("pkd/certificate.pa", null));
        var pkdCertificate = new RGLPKDCertificate(binaryData, RGLPKDResourceType.Certificate_PA, null);
        callback([pkdCertificate]);
    }
    override public void OnRequestTACertificatesWithKey(string keyCAR, RGLRFIDCertificatesCallback callback)
    {
        var binaryData = NSData.FromFile(NSBundle.MainBundle.PathForResource("pkd/certificate.pa", null));
        var pkdCertificate = new RGLPKDCertificate(binaryData, RGLPKDResourceType.Certificate_TA, null);
        callback([pkdCertificate]);
    }
    override public void OnRequestTASignatureWithChallenge(RGLTAChallenge challenge, Action<NSData> callback)
    {
        var binaryData = NSData.FromFile(NSBundle.MainBundle.PathForResource("pkd/certificate.pa", null));
        callback(binaryData);
    }
}

Clear Up

To clear the list of PKD certificates, use:

DocReader.shared.clearPKDCertificates()
[RGLDocReader.shared clearPKDCertificates];
DocumentReader.Instance().clearPKDCertificates()
DocumentReader.Instance().clearPKDCertificates();
DocumentReader.instance.clearPKDCertificates();
DocumentReader.clearPKDCertificates((str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.clearPKDCertificates()
DocumentReader.clearPKDCertificates(function (m) { }, function (e) { console.log(e) });
// Android
DocumentReader.Instance().ClearPKDCertificates();

// iOS
RGLDocReader.Shared.ClearPKDCertificates();

Ignore Notification Codes during PA

To define notification codes that should be ignored during passive authentication (PA), set the paIgnoreNotificationCodes array:

let rfidParams = RFIDParams()
rfidParams.paIgnoreNotificationCodes = [-1879047658, -1879047667]
DocReader.shared.processParams.rfidParams = rfidParams
RFIDParams rfidParams = new RFIDParams();
rfidParams.paIgnoreNotificationCodes(new int[] {-1879047658, -1879047667});
DocumentReader.Instance().processParams.rfidParams = rfidParams;
val rfidParams = RFIDParams()
rfidParams.paIgnoreNotificationCodes = intArrayOf(-1879047658, -1879047667)
Instance().processParams().rfidParams = rfidParams

For the full list of notification codes, see the platform-specific enumeration eLDS_ParsingNotificationCodes by the link below.

TCC Params

Sets the given TCC Params to the RFID session. The parameters are required to be set before starting the RFID session.

The TCCParams includes the following properties:

  • serviceTAURLString is the TA URL for the TCC service. The value of the property must be a valid URL string.
  • servicePAURLString is the PA URL for the TCC service. The value of the property must be a valid URL string.
  • pfxCertURLString is the URL for the certificate for a TCC service. The value of the property must be a valid URL string.
  • pfxCertData is the bytes of the certificate for a TCC service. This data will be used instead of loading the certificate via pfxCertURLString.
  • pfxPassPhrase is the passphrase for the cerficiate provided by the pfxCertURLString property.
let tccParams = TCCParams(
    serviceTAURLString: "",
    servicePAURLString: "",
    pfxCertURLString: "",
    pfxCertData: nil,
    pfxPassPhrase: ""
)
DocReader.shared.setTCCParams(tccParams) { success, error in
    // check `success` or `error`...
}
TCCParams *tccParams = [[TCCParams alloc] initWithServiceTAURLString:@""
                                                  servicePAURLString:@""
                                                    pfxCertURLString:@""
                                                        pfxCertData:nil,
                                                       pfxPassPhrase:@""];
[RGLDocReader.shared setTCCParams:tccParams completion:^(BOOL success, NSError * _Nullable error) {
    // check `success` or `error`...
}];
val tccParams = TccParams()
tccParams.serviceUrlTA = ""
tccParams.serviceUrlPA = ""
tccParams.pfxCertUrl = ""
tccParams.pfxCert = null
tccParams.pfxPassPhrase = ""

DocumentReader.Instance().setTccParams(
    tccParams
) { success, error -> }
TccParams tccParams = new TccParams();
tccParams.setServiceUrlTA("");
tccParams.setServiceUrlPA("");
tccParams.setPfxCertUrl("");
tccParams.setPfxCert(null);
tccParams.setPfxPassPhrase("");

DocumentReader.Instance().setTccParams(tccParams, new ITccParamsCompletion() {
    @Override
    public void onSetTccParamsCompleted(boolean success, @Nullable DocumentReaderException error) {

    }
});

RFID Delegate (iOS-Specific)

The RFID chip delegate:

DocReader.shared.rfidDelegate = self
[RGLDocReader shared].rfidDelegate = self;

func didChipConnected()

Tells the delegate that the connection with the RFID chip is established.

func didChipConnected() {
    print("Connected")
}
- (void)didChipConnected {
    NSLog(@"Connected");
}

func didReceivedError(RFIDErrorCodes)

Tells the delegate an error appeared during the RFID chip processing.

func didReceivedError(_ errorCode: RFIDErrorCodes) {
    print(errorCode.rawValue)
}
- (void)didReceivedError:(RGLRFIDErrorCodes)errorCode {
    NSLog(@"%u", errorCode);
}

For information about the methods you can implement for your delegate object, see the API Reference.

Examples

Explore the examples of the RFID processing by the links:

Next Steps