@regulaforensics/react-native-document-reader-api 7.3.631-nightly → 7.3.658-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  blank_issues_enabled: false
2
2
  contact_links:
3
- - name: Regula Help Center
3
+ - name: Submit a request
4
4
  url: https://support.regulaforensics.com/hc/requests/new?utm_source=github
5
- about: Please submit any requests here
5
+ about: Submit any requests to Regula Support Team
@@ -14,6 +14,6 @@ Pod::Spec.new do |s|
14
14
  s.source = { :http => 'file:' + __dir__ }
15
15
  s.ios.deployment_target = '11.0'
16
16
  s.source_files = "ios/*.{h,m}"
17
- s.dependency 'DocumentReaderNightly', '7.3.3666'
17
+ s.dependency 'DocumentReaderBeta', '7.3.3716'
18
18
  s.dependency 'React'
19
19
  end
@@ -32,7 +32,7 @@ android {
32
32
  rootProject.allprojects {
33
33
  repositories {
34
34
  maven {
35
- url "https://maven.regulaforensics.com/RegulaDocumentReader/Nightly"
35
+ url "https://maven.regulaforensics.com/RegulaDocumentReader/Beta"
36
36
  }
37
37
  }
38
38
  }
@@ -41,7 +41,7 @@ dependencies {
41
41
  //noinspection GradleDynamicVersion
42
42
  implementation 'com.facebook.react:react-native:+'
43
43
  //noinspection GradleDependency
44
- implementation('com.regula.documentreader:api:7.3.9943') {
44
+ implementation('com.regula.documentreader:api:7.1.9980') {
45
45
  transitive = true
46
46
  }
47
47
  }
@@ -18,6 +18,7 @@ import androidx.core.content.ContextCompat
18
18
  import com.regula.documentreader.api.enums.CustomizationColor
19
19
  import com.regula.documentreader.api.enums.CustomizationFont
20
20
  import com.regula.documentreader.api.enums.CustomizationImage
21
+ import com.regula.documentreader.api.enums.LogLevel
21
22
  import com.regula.documentreader.api.params.AuthenticityParams
22
23
  import com.regula.documentreader.api.params.Functionality
23
24
  import com.regula.documentreader.api.params.ImageQA
@@ -146,6 +147,8 @@ fun setProcessParams(processParams: ProcessParam, opts: JSONObject) = opts.forEa
146
147
  "imageOutputMaxWidth" -> processParams.imageOutputMaxWidth = v.toInt()
147
148
  "processAuth" -> processParams.processAuth = v.toInt()
148
149
  "convertCase" -> processParams.convertCase = v.toInt()
150
+ "logLevel" -> processParams.logLevel = LogLevel.valueOf(v.toString())
151
+ "mrzDetectMode" -> processParams.mrzDetectMode = v.toInt()
149
152
  "dateFormat" -> processParams.dateFormat = v as String
150
153
  "scenario" -> processParams.scenario = v as String
151
154
  "captureButtonScenario" -> processParams.captureButtonScenario = v as String
@@ -154,6 +157,7 @@ fun setProcessParams(processParams: ProcessParam, opts: JSONObject) = opts.forEa
154
157
  "timeoutFromFirstDetect" -> processParams.timeoutFromFirstDetect = v.toDouble()
155
158
  "timeoutFromFirstDocType" -> processParams.timeoutFromFirstDocType = v.toDouble()
156
159
  "documentAreaMin" -> processParams.documentAreaMin = v.toDouble()
160
+ "timeoutLiveness" -> processParams.timeoutLiveness = v.toDouble()
157
161
  "documentIDList" -> processParams.documentIDList = v.toIntArray()
158
162
  "fieldTypesFilter" -> processParams.fieldTypesFilter = v.toIntArray()
159
163
  "resultTypeOutput" -> processParams.resultTypeOutput = v.toIntArray()
@@ -220,6 +224,8 @@ fun getProcessParams(processParams: ProcessParam) = mapOf(
220
224
  "imageOutputMaxWidth" to processParams.imageOutputMaxWidth,
221
225
  "processAuth" to processParams.processAuth,
222
226
  "convertCase" to processParams.convertCase,
227
+ "logLevel" to processParams.logLevel?.toString(),
228
+ "mrzDetectMode" to processParams.mrzDetectMode,
223
229
  "dateFormat" to processParams.dateFormat,
224
230
  "scenario" to processParams.scenario,
225
231
  "captureButtonScenario" to processParams.captureButtonScenario,
@@ -228,6 +234,7 @@ fun getProcessParams(processParams: ProcessParam) = mapOf(
228
234
  "timeoutFromFirstDetect" to processParams.timeoutFromFirstDetect,
229
235
  "timeoutFromFirstDocType" to processParams.timeoutFromFirstDocType,
230
236
  "documentAreaMin" to processParams.documentAreaMin,
237
+ "timeoutLiveness" to processParams.timeoutLiveness,
231
238
  "documentIDList" to processParams.documentIDList.generate(),
232
239
  "fieldTypesFilter" to processParams.fieldTypesFilter.generate(),
233
240
  "documentGroupFilter" to processParams.documentGroupFilter.generate(),
@@ -654,6 +661,7 @@ fun setColors(input: ParamsCustomization.CustomizationEditor, opts: JSONObject)
654
661
  "rfidProcessingScreenProgressBar" -> input.setColor(CustomizationColor.RFID_PROCESSING_SCREEN_PROGRESS_BAR, value)
655
662
  "rfidProcessingScreenProgressBarBackground" -> input.setColor(CustomizationColor.RFID_PROCESSING_SCREEN_PROGRESS_BAR_BACKGROUND, value)
656
663
  "rfidProcessingScreenResultLabelText" -> input.setColor(CustomizationColor.RFID_PROCESSING_SCREEN_RESULT_LABEL_TEXT, value)
664
+ "rfidProcessingScreenLoadingBar" -> input.setColor(CustomizationColor.RFID_PROCESSING_SCREEN_LOADING_BAR, value)
657
665
  }
658
666
  }
659
667
 
@@ -665,6 +673,7 @@ fun getColors(input: Map<CustomizationColor, Long>) = mapOf(
665
673
  "rfidProcessingScreenProgressBar" to input[CustomizationColor.RFID_PROCESSING_SCREEN_PROGRESS_BAR],
666
674
  "rfidProcessingScreenProgressBarBackground" to input[CustomizationColor.RFID_PROCESSING_SCREEN_PROGRESS_BAR_BACKGROUND],
667
675
  "rfidProcessingScreenResultLabelText" to input[CustomizationColor.RFID_PROCESSING_SCREEN_RESULT_LABEL_TEXT],
676
+ "rfidProcessingScreenLoadingBar" to input[CustomizationColor.RFID_PROCESSING_SCREEN_LOADING_BAR],
668
677
  ).toJsonObject()
669
678
 
670
679
  fun setFonts(input: ParamsCustomization.CustomizationEditor, opts: JSONObject) = opts.forEach { key, value ->
@@ -5,9 +5,11 @@
5
5
  // Created by Pavel Masiuk on 21.09.2023.
6
6
  // Copyright © 2023 Regula. All rights reserved.
7
7
  //
8
+ @file:SuppressLint("MissingPermission")
8
9
 
9
10
  package com.regula.documentreader
10
11
 
12
+ import android.annotation.SuppressLint
11
13
  import android.content.Context
12
14
  import android.graphics.Bitmap
13
15
  import android.graphics.Rect
@@ -218,6 +220,7 @@ fun docReaderConfigFromJSON(input: JSONObject): DocReaderConfig {
218
220
  var result = DocReaderConfig(license!!)
219
221
 
220
222
  if (input.has("customDb")) result = DocReaderConfig(license, byteArrayFromBase64(input.getString("customDb"))!!)
223
+ if (input.has("databasePath")) result = DocReaderConfig(license, input.getString("databasePath"))
221
224
  if (input.has("licenseUpdate")) result.setLicenseUpdate(input.getBoolean("licenseUpdate"))
222
225
  if (input.has("delayedNNLoad")) result.isDelayedNNLoad = input.getBoolean("delayedNNLoad")
223
226
  if (input.has("blackList")) result.blackList = input.getJSONObject("blackList")
@@ -232,6 +235,7 @@ fun generateDocReaderConfig(temp: DocReaderConfig?): JSONObject? {
232
235
 
233
236
  result.put("license", generateByteArray(input.license))
234
237
  result.put("customDb", generateByteArray(input.customDb))
238
+ result.put("databasePath", input.customDbPath)
235
239
  result.put("licenseUpdate", input.isLicenseUpdate)
236
240
  result.put("delayedNNLoad", input.isDelayedNNLoad)
237
241
  result.put("blackList", input.blackList)
@@ -101,7 +101,7 @@ val lifecycle: Lifecycle
101
101
 
102
102
  fun exec(action: String?, arguments: ReadableArray, successCallback: com.facebook.react.bridge.Callback, errorCallback: com.facebook.react.bridge.Callback) {
103
103
  args = JSONArray(arguments.toArrayList())
104
- activity = reactContext.currentActivity!!
104
+ reactContext.currentActivity?.let { activity = it }
105
105
  val callback = object : Callback {
106
106
  override fun success(data: Any?) = successCallback.invoke(data.toSendable())
107
107
  override fun error(message: String) = errorCallback.invoke(message)
@@ -115,6 +115,10 @@ fun exec(action: String?, arguments: ReadableArray, successCallback: com.faceboo
115
115
  "setRfidSessionStatus" -> setRfidSessionStatus(callback)
116
116
  "getTag" -> getTag(callback)
117
117
  "setTag" -> setTag(argsNullable(0))
118
+ "getTenant" -> getTenant(callback)
119
+ "setTenant" -> setTenant(argsNullable(0))
120
+ "getEnv" -> getEnv(callback)
121
+ "setEnv" -> setEnv(argsNullable(0))
118
122
  "getFunctionality" -> getFunctionality(callback)
119
123
  "setFunctionality" -> setFunctionality(args(0))
120
124
  "getProcessParams" -> getProcessParams(callback)
@@ -188,7 +192,6 @@ val context
188
192
  get() = activity
189
193
 
190
194
  var backgroundRFIDEnabled = false
191
- var databaseDownloadProgress = 0
192
195
 
193
196
  const val eventCompletion = "completion"
194
197
  const val eventDatabaseProgress = "database_progress"
@@ -224,6 +227,14 @@ fun getTag(callback: Callback) = callback.success(Instance().tag)
224
227
 
225
228
  fun setTag(tag: String?) = tag.let { Instance().tag = it }
226
229
 
230
+ fun getTenant(callback: Callback) = callback.success(Instance().tenant)
231
+
232
+ fun setTenant(tag: String?) = tag.let { Instance().tenant = it }
233
+
234
+ fun getEnv(callback: Callback) = callback.success(Instance().env)
235
+
236
+ fun setEnv(tag: String?) = tag.let { Instance().env = it }
237
+
227
238
  fun getFunctionality(callback: Callback) = callback.success(getFunctionality(Instance().functionality()))
228
239
 
229
240
  fun setFunctionality(functionality: JSONObject) = setFunctionality(Instance().functionality(), functionality)
package/example/App.tsx CHANGED
@@ -214,7 +214,7 @@ export default class App extends React.Component<IProps, IState> {
214
214
  }
215
215
 
216
216
  handleResults(results: DocumentReaderResults) {
217
- if (this.state.doRfid && !isReadingRfid && results.chipPage != 0) {
217
+ if (this.state.doRfid && !isReadingRfid && results != null && results.chipPage != 0) {
218
218
  // this.customRFID()
219
219
  this.usualRFID()
220
220
  } else {