Skip to content

Commit 8c07f9e

Browse files
author
Jenkins
committed
9.5.608
1 parent b0022fe commit 8c07f9e

11 files changed

Lines changed: 110 additions & 43 deletions

File tree

RNDocumentReaderApi.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ Pod::Spec.new do |s|
1414
s.source = { :http => 'file:' + __dir__ }
1515
s.ios.deployment_target = '13.0'
1616
s.source_files = "ios/*.{h,m}"
17-
s.dependency 'DocumentReader', '9.4.6317'
17+
s.dependency 'DocumentReader', '9.5.6464'
1818
s.dependency 'React'
1919
end

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies {
2929
//noinspection GradleDynamicVersion
3030
implementation 'com.facebook.react:react-native:+'
3131
//noinspection GradleDependency
32-
implementation('com.regula.documentreader:api:9.4.12820') {
32+
implementation('com.regula.documentreader:api:9.5.12960') {
3333
transitive = true
3434
}
3535
}

android/src/main/java/com/regula/plugin/documentreader/Config.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ fun setFunctionality(config: Functionality, input: JSONObject) = input.forEach {
5151
"manualMultipageMode" -> editor.setManualMultipageMode(v as Boolean)
5252
"torchTurnedOn" -> editor.setTorchTurnedOn(v as Boolean)
5353
"preventScreenRecording" -> editor.setPreventScreenRecording(v as Boolean)
54+
"hideStatusBar" -> editor.setHideStatusBar(v as Boolean)
5455
"showCaptureButtonDelayFromDetect" -> editor.setShowCaptureButtonDelayFromDetect(v.toLong())
5556
"showCaptureButtonDelayFromStart" -> editor.setShowCaptureButtonDelayFromStart(v.toLong())
5657
"orientation" -> editor.setOrientation(v.toInt())
@@ -88,6 +89,7 @@ fun getFunctionality(input: Functionality) = mapOf(
8889
"manualMultipageMode" to input.isManualMultipageMode,
8990
"torchTurnedOn" to input.isTorchTurnedOn,
9091
"preventScreenRecording" to input.doPreventScreenRecording(),
92+
"hideStatusBar" to input.doHideStatusBar(),
9193
"showCaptureButtonDelayFromDetect" to input.showCaptureButtonDelayFromDetect,
9294
"showCaptureButtonDelayFromStart" to input.showCaptureButtonDelayFromStart,
9395
"orientation" to input.orientation,
@@ -129,7 +131,6 @@ fun setProcessParams(processParams: ProcessParam, opts: JSONObject) = opts.forEa
129131
"updateOCRValidityByGlare" -> processParams.updateOCRValidityByGlare = v as Boolean
130132
"noGraphics" -> processParams.noGraphics = v as Boolean
131133
"multiDocOnImage" -> processParams.multiDocOnImage = v as Boolean
132-
"forceReadMrzBeforeLocate" -> processParams.forceReadMrzBeforeLocate = v as Boolean
133134
"parseBarcodes" -> processParams.parseBarcodes = v as Boolean
134135
"shouldReturnPackageForReprocess" -> processParams.shouldReturnPackageForReprocess = v as Boolean
135136
"disablePerforationOCR" -> processParams.disablePerforationOCR = v as Boolean
@@ -153,6 +154,7 @@ fun setProcessParams(processParams: ProcessParam, opts: JSONObject) = opts.forEa
153154
"strictExpiryDate" -> processParams.strictExpiryDate = v as Boolean
154155
"debugSaveBinarySession" -> processParams.debugSaveBinarySession = v as Boolean
155156
"checkVDS" -> processParams.checkVDS = v as Boolean
157+
"strictAgeCheck" -> processParams.strictAgeCheck = v as Boolean
156158
"measureSystem" -> processParams.measureSystem = v.toInt()
157159
"barcodeParserType" -> processParams.barcodeParserType = v.toInt()
158160
"perspectiveAngle" -> processParams.perspectiveAngle = v.toInt()
@@ -222,7 +224,6 @@ fun getProcessParams(processParams: ProcessParam) = mapOf(
222224
"updateOCRValidityByGlare" to processParams.updateOCRValidityByGlare,
223225
"noGraphics" to processParams.noGraphics,
224226
"multiDocOnImage" to processParams.multiDocOnImage,
225-
"forceReadMrzBeforeLocate" to processParams.forceReadMrzBeforeLocate,
226227
"parseBarcodes" to processParams.parseBarcodes,
227228
"shouldReturnPackageForReprocess" to processParams.shouldReturnPackageForReprocess,
228229
"disablePerforationOCR" to processParams.disablePerforationOCR,
@@ -246,6 +247,7 @@ fun getProcessParams(processParams: ProcessParam) = mapOf(
246247
"strictExpiryDate" to processParams.strictExpiryDate,
247248
"debugSaveBinarySession" to processParams.debugSaveBinarySession,
248249
"checkVDS" to processParams.checkVDS,
250+
"strictAgeCheck" to processParams.strictAgeCheck,
249251
"measureSystem" to processParams.measureSystem,
250252
"barcodeParserType" to processParams.barcodeParserType,
251253
"perspectiveAngle" to processParams.perspectiveAngle,
@@ -753,6 +755,7 @@ fun setLivenessParams(input: LivenessParams, opts: JSONObject) = opts.forEach {
753755
"checkBlackAndWhiteCopy" -> input.checkBlackAndWhiteCopy = v as Boolean
754756
"checkDynaprint" -> input.checkDynaprint = v as Boolean
755757
"checkGeometry" -> input.checkGeometry = v as Boolean
758+
"checkBarcodeBackground" -> input.checkBarcodeBackground = v as Boolean
756759
}
757760
}
758761

@@ -765,6 +768,7 @@ fun getLivenessParams(input: LivenessParams?) = input?.let {
765768
"checkBlackAndWhiteCopy" to input.checkBlackAndWhiteCopy,
766769
"checkDynaprint" to input.checkDynaprint,
767770
"checkGeometry" to input.checkGeometry,
771+
"checkBarcodeBackground" to input.checkBarcodeBackground,
768772
).toJson()
769773
}
770774

android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,12 @@ fun recognizeConfigFromJSON(input: JSONObject) = input.let {
273273
for (i in images.indices) images[i] = base64Images.getString(i).toBitmap()
274274
builder.setBitmaps(images)
275275
}
276+
if (it.has("dataList")) {
277+
val array = it.getJSONArray("dataList")
278+
val dataList = mutableListOf<ByteArray>()
279+
for (i in 0..< array.length()) dataList.add(array.getString(i).toByteArray()!!)
280+
builder.setData(dataList)
281+
}
276282
if (it.has("imageInputData")) {
277283
val base64InputData = it.getJSONArray("imageInputData")
278284
val inputData = arrayOfNulls<ImageInputData>(base64InputData.length())
@@ -291,14 +297,8 @@ fun generateRecognizeConfig(input: RecognizeConfig?) = input?.let {
291297
"livePortrait" to it.livePortrait.toBase64(),
292298
"extPortrait" to it.extPortrait.toBase64(),
293299
"image" to it.bitmap.toBase64(),
294-
"data" to it.data.toBase64(),
295-
"images" to
296-
if (it.bitmaps == null) null
297-
else {
298-
val array = JSONArray()
299-
for (bitmap in it.bitmaps!!) array.put(bitmap.toBase64())
300-
array
301-
},
300+
"images" to it.bitmaps?.map { bp -> bp.toBase64() }?.toJson(),
301+
"dataList" to it.data?.map { bp -> bp.toBase64() }?.toJson(),
302302
"imageInputData" to it.imageInputData.toJson(::generateImageInputData)
303303
).toJson()
304304
}

example/package-lock.json

Lines changed: 32 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"test": "jest"
1111
},
1212
"dependencies": {
13-
"@regulaforensics/react-native-document-reader-api": "9.4.559",
14-
"@regulaforensics/react-native-document-reader-core-fullauthrfid": "9.4.2379",
13+
"@regulaforensics/react-native-document-reader-api": "9.5.608",
14+
"@regulaforensics/react-native-document-reader-core-fullauthrfid": "9.5.2670",
1515
"@rneui/base": "4.0.0-rc.7",
1616
"@rneui/themed": "4.0.0-rc.7",
1717
"react": "19.0.0",

index.d.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,6 +1652,7 @@ export class RecognizeConfig {
16521652
image?: string
16531653
data?: string
16541654
images?: string[]
1655+
dataList?: string[]
16551656
imageInputData?: ImageInputData[]
16561657

16571658
static fromJson(jsonObject?: any): RecognizeConfig | undefined {
@@ -1672,6 +1673,12 @@ export class RecognizeConfig {
16721673
result.images.push(jsonObject["images"][i])
16731674
}
16741675
}
1676+
result.dataList = []
1677+
if (jsonObject["dataList"] != null) {
1678+
for (const i in jsonObject["dataList"]) {
1679+
result.dataList.push(jsonObject["dataList"][i])
1680+
}
1681+
}
16751682
result.imageInputData = []
16761683
if (jsonObject["imageInputData"] != null) {
16771684
for (const i in jsonObject["imageInputData"]) {
@@ -1936,6 +1943,7 @@ export class Functionality {
19361943
torchTurnedOn?: boolean
19371944
preventScreenRecording?: boolean
19381945
homeIndicatorAutoHide?: boolean
1946+
hideStatusBar?: boolean
19391947
showCaptureButtonDelayFromDetect?: number
19401948
showCaptureButtonDelayFromStart?: number
19411949
rfidTimeout?: number
@@ -1977,6 +1985,7 @@ export class Functionality {
19771985
result.torchTurnedOn = jsonObject["torchTurnedOn"]
19781986
result.preventScreenRecording = jsonObject["preventScreenRecording"]
19791987
result.homeIndicatorAutoHide = jsonObject["homeIndicatorAutoHide"]
1988+
result.hideStatusBar = jsonObject["hideStatusBar"]
19801989
result.showCaptureButtonDelayFromDetect = jsonObject["showCaptureButtonDelayFromDetect"]
19811990
result.showCaptureButtonDelayFromStart = jsonObject["showCaptureButtonDelayFromStart"]
19821991
result.rfidTimeout = jsonObject["rfidTimeout"]
@@ -2166,6 +2175,7 @@ export class LivenessParams {
21662175
checkBlackAndWhiteCopy?: boolean
21672176
checkDynaprint?: boolean
21682177
checkGeometry?: boolean
2178+
checkBarcodeBackground?: boolean
21692179

21702180
static fromJson(jsonObject?: any): LivenessParams | undefined {
21712181
if (jsonObject == null || jsonObject == undefined) return undefined
@@ -2178,6 +2188,7 @@ export class LivenessParams {
21782188
result.checkBlackAndWhiteCopy = jsonObject["checkBlackAndWhiteCopy"]
21792189
result.checkDynaprint = jsonObject["checkDynaprint"]
21802190
result.checkGeometry = jsonObject["checkGeometry"]
2191+
result.checkBarcodeBackground = jsonObject["checkBarcodeBackground"]
21812192

21822193
return result
21832194
}
@@ -2248,7 +2259,6 @@ export class ProcessParams {
22482259
updateOCRValidityByGlare?: boolean
22492260
noGraphics?: boolean
22502261
multiDocOnImage?: boolean
2251-
forceReadMrzBeforeLocate?: boolean
22522262
parseBarcodes?: boolean
22532263
shouldReturnPackageForReprocess?: boolean
22542264
disablePerforationOCR?: boolean
@@ -2271,6 +2281,7 @@ export class ProcessParams {
22712281
strictExpiryDate?: boolean
22722282
debugSaveBinarySession?: boolean
22732283
checkVDS?: boolean
2284+
strictAgeCheck?: boolean
22742285
barcodeParserType?: number
22752286
perspectiveAngle?: number
22762287
minDPI?: number
@@ -2337,7 +2348,6 @@ export class ProcessParams {
23372348
result.updateOCRValidityByGlare = jsonObject["updateOCRValidityByGlare"]
23382349
result.noGraphics = jsonObject["noGraphics"]
23392350
result.multiDocOnImage = jsonObject["multiDocOnImage"]
2340-
result.forceReadMrzBeforeLocate = jsonObject["forceReadMrzBeforeLocate"]
23412351
result.parseBarcodes = jsonObject["parseBarcodes"]
23422352
result.shouldReturnPackageForReprocess = jsonObject["shouldReturnPackageForReprocess"]
23432353
result.disablePerforationOCR = jsonObject["disablePerforationOCR"]
@@ -2360,6 +2370,7 @@ export class ProcessParams {
23602370
result.strictExpiryDate = jsonObject["strictExpiryDate"]
23612371
result.debugSaveBinarySession = jsonObject["debugSaveBinarySession"]
23622372
result.checkVDS = jsonObject["checkVDS"]
2373+
result.strictAgeCheck = jsonObject["strictAgeCheck"]
23632374
result.barcodeParserType = jsonObject["barcodeParserType"]
23642375
result.perspectiveAngle = jsonObject["perspectiveAngle"]
23652376
result.minDPI = jsonObject["minDPI"]
@@ -3759,6 +3770,8 @@ export const eLDS_ParsingErrorCodes = {
37593770
ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_SIG_ALGORITHM: 0x81000308,
37603771
ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_CERTIFICATE: 0x81000309,
37613772
ERR_LDS_VDS_NC_MISSING_OR_INCORRECT_SIG_VALUE: 0x8100030A,
3773+
ERR_LDS_PACE_CAM_DATA_USAGE_INCORRECT: 0x8100012B,
3774+
ERR_LDS_PACE_IM_MAPPING_DATA_INCORRECT: 0x8100012F,
37623775
}
37633776

37643777
export const eRFID_CertificateType = {
@@ -3773,6 +3786,7 @@ export const eRFID_CertificateType = {
37733786
CT_LDS2: 8,
37743787
CT_BCS: 9,
37753788
CT_BCSNC: 10,
3789+
CT_MDLS: 13,
37763790
}
37773791

37783792
export const RGLMeasureSystem = {
@@ -4594,6 +4608,11 @@ export const eLDS_ParsingNotificationCodes = {
45944608
NTF_LDS_ICAO_CERTIFICATE_SUBJECT_COUNTRY_NON_UPPER_CASE: 0x90000254,
45954609
NTFLDS_SI_STORAGE_CS_NONCONSISTANT: 0x91000111,
45964610
NTFLDS_SI_STORAGE_CS_PACE_CAM_KEY_MISSING: 0x91000112,
4611+
NTFLDS_ASN_CERTIFICATE_NONMATCHINGDSROLE: 0x90000011,
4612+
NTFLDS_MDL_CERTIFICATE_CHAIN_SOP_NONMATCHING: 0x90000400,
4613+
NTFLDS_MDL_CERTIFICATE_UNSUPPORTEDPUBLICKEYALGORITHM: 0x90000401,
4614+
NTFLDS_MDL_CERTIFICATE_UNSUPPORTEDSIGNATUREALGORITHM: 0x90000402,
4615+
NTFLDS_MDL_CERTIFICATE_UNSUPPORTEDPUBLICKEYPARAMS: 0x90000403,
45974616
}
45984617

45994618
export const eImageQualityCheckType = {

0 commit comments

Comments
 (0)