@regulaforensics/cordova-plugin-document-reader-api 6.6.1 → 6.7.1

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.
@@ -21,9 +21,12 @@
21
21
  <preference name="GradlePluginKotlinCodeStyle" value="official" />
22
22
  <preference name="GradlePluginKotlinVersion" value="1.7.10" />
23
23
  <preference name="android-minSdkVersion" value="21" />
24
- <preference name="android-targetSdkVersion" value="33" />
24
+ <preference name="android-targetSdkVersion" value="31" />
25
25
  <preference name="AndroidXEnabled" value="true" />
26
26
  <allow-intent href="market:*" />
27
+ <config-file parent="/manifest/application" target="AndroidManifest.xml">
28
+ <activity android:label="@string/multi_app_name" android:name="com.synconset.MultiImageChooserActivity" android:theme="@style/Theme.AppCompat.Light" />
29
+ </config-file>
27
30
  <config-file parent="/*" target="AndroidManifest.xml">
28
31
  <uses-permission android:name="android.permission.NFC" />
29
32
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
@@ -16,10 +16,10 @@
16
16
  "cordova-android": "^10.1.1",
17
17
  "cordova-ios": "^6.2.0",
18
18
  "cordova-plugin-add-swift-support": "^2.0.2",
19
- "@regulaforensics/cordova-plugin-document-reader-api": "6.6.1",
20
- "@regulaforensics/cordova-plugin-document-reader-core-fullrfid": "6.6.0",
19
+ "@regulaforensics/cordova-plugin-document-reader-api": "6.7.1",
20
+ "@regulaforensics/cordova-plugin-document-reader-core-fullrfid": "6.7.0",
21
21
  "cordova-plugin-file": "^6.0.2",
22
- "cordova-plugin-image-picker": "^1.1.3",
22
+ "cordova-plugin-telerik-imagepicker": "^2.3.5",
23
23
  "cordova-plugin-android-permissions": "1.1.0",
24
24
  "cordova-plugin-advanced-http": "3.2.1",
25
25
  "jetifier": "^2.0.0"
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "@regulaforensics/cordova-plugin-document-reader-core-fullrfid": {},
34
34
  "cordova-plugin-file": {},
35
- "cordova-plugin-image-picker": {
35
+ "cordova-plugin-telerik-imagepicker": {
36
36
  "PHOTO_LIBRARY_USAGE_DESCRIPTION": " "
37
37
  },
38
38
  "cordova-plugin-whitelist": {},
@@ -90,22 +90,11 @@ var app = {
90
90
  }
91
91
 
92
92
  function recognize() {
93
- window.imagePicker.getPictures(function (results) {
94
- if (results.length > 0) {
95
- clearResults()
96
- document.getElementById("status").innerHTML = "copying image......"
97
- document.getElementById("status").style.backgroundColor = "grey"
98
- }
99
- var images = []
100
- for (var index in results)
101
- readFile(results[index], function (base64) {
102
- document.getElementById("status").innerHTML = "processing image......"
103
- document.getElementById("status").style.backgroundColor = "grey"
104
- images.push(base64)
105
- if (images.length === results.length)
106
- DocumentReader.recognizeImages(images, function (m) { handleCompletion(DocumentReader.DocumentReaderCompletion.fromJson(JSON.parse(m))) }, function (e) { })
107
- })
108
- }, function (e) { }, { maximumImagesCount: 10 })
93
+ window.imagePicker.getPictures(function (images) {
94
+ document.getElementById("status").innerHTML = "processing image......"
95
+ document.getElementById("status").style.backgroundColor = "grey"
96
+ DocumentReader.recognizeImages(images, function (m) { handleCompletion(DocumentReader.DocumentReaderCompletion.fromJson(JSON.parse(m))) }, function (e) { })
97
+ }, function (e) { }, { maximumImagesCount: 10, outputType: window.imagePicker.OutputType.BASE64_STRING })
109
98
  }
110
99
 
111
100
  function handleCompletion(completion) {
@@ -125,7 +114,7 @@ var app = {
125
114
  handleResults(completion.results)
126
115
  if (completion.action === Enum.DocReaderAction.TIMEOUT)
127
116
  handleResults(completion.results)
128
- if(completion.action === Enum.DocReaderAction.CANCEL || completion.action === Enum.DocReaderAction.ERROR)
117
+ if (completion.action === Enum.DocReaderAction.CANCEL || completion.action === Enum.DocReaderAction.ERROR)
129
118
  isReadingRfid = false
130
119
  }
131
120
 
@@ -161,7 +150,7 @@ var app = {
161
150
 
162
151
  function updateRfidUI(results) {
163
152
  if (results.code === Enum.eRFID_NotificationCodes.RFID_NOTIFICATION_PCSC_READING_DATAGROUP) {
164
- rfidDescription = Enum.eRFID_DataFile_Type.getTranslation(results.number)
153
+ rfidDescription = Enum.eRFID_DataFile_Type.getTranslation(results.dataFileType)
165
154
  document.getElementById("rfidDescription").innerHTML = rfidDescription
166
155
  }
167
156
  rfidUIHeader = "Reading RFID"
@@ -242,21 +231,21 @@ var app = {
242
231
  }
243
232
 
244
233
  function displayResults(results) {
245
- if(results == null) return
234
+ if (results == null) return
246
235
 
247
- DocumentReader.getTextFieldValueByType(results, Enum.eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES, function (value) {
236
+ DocumentReader.textFieldValueByType(results, Enum.eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES, function (value) {
248
237
  document.getElementById("status").style.backgroundColor = "green"
249
238
  document.getElementById("status").innerHTML = value
250
- this.setState({ fullName: value })
239
+ this.setState({ fullName: value })
251
240
  }, function (error) { console.log(error) })
252
241
 
253
- DocumentReader.getGraphicFieldImageByType(results, Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE, function (value) {
254
- if(value != null)
242
+ DocumentReader.graphicFieldImageByType(results, Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE, function (value) {
243
+ if (value != null)
255
244
  document.getElementById("documentImage").src = "data:image/png;base64," + value
256
245
  }, function (error) { console.log(error) })
257
246
 
258
- DocumentReader.getGraphicFieldImageByType(results, Enum.eGraphicFieldType.GF_PORTRAIT, function (value) {
259
- if(value != null)
247
+ DocumentReader.graphicFieldImageByType(results, Enum.eGraphicFieldType.GF_PORTRAIT, function (value) {
248
+ if (value != null)
260
249
  document.getElementById("portraitImage").src = "data:image/png;base64," + value
261
250
  }, function (error) { console.log(error) })
262
251
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/cordova-plugin-document-reader-api",
3
- "version": "6.6.1",
3
+ "version": "6.7.1",
4
4
  "description": "Cordova plugin for reading and validation of identification documents (API framework)",
5
5
  "cordova": {
6
6
  "id": "@regulaforensics/cordova-plugin-document-reader-api",
package/plugin.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <plugin id="cordova-plugin-document-reader-api" version="6.6.1"
2
+ <plugin id="cordova-plugin-document-reader-api" version="6.7.1"
3
3
  xmlns="http://apache.org/cordova/ns/plugins/1.0">
4
4
  <name>DocumentReaderApi</name>
5
5
  <description>Cordova plugin Document reader api</description>
@@ -26,7 +26,7 @@
26
26
  <config>
27
27
  </config>
28
28
  <pods>
29
- <pod name="DocumentReader" spec="~> 6.6.2753" />
29
+ <pod name="DocumentReader" spec="6.7.2848" />
30
30
  </pods>
31
31
  </podspec>
32
32
  </platform>
@@ -9,6 +9,7 @@ import android.content.IntentFilter;
9
9
  import android.graphics.Bitmap;
10
10
  import android.nfc.NfcAdapter;
11
11
  import android.nfc.tech.IsoDep;
12
+ import android.os.Build;
12
13
  import android.os.Bundle;
13
14
  import android.util.Base64;
14
15
 
@@ -396,56 +397,56 @@ public class DocumentReader extends CordovaPlugin {
396
397
  case "recognizeImagesWithImageInputs":
397
398
  recognizeImagesWithImageInputs(callback, args(0));
398
399
  break;
399
- case "getTextFieldValueByType":
400
- getTextFieldValueByType(callback, args(0), args(1));
400
+ case "textFieldValueByType":
401
+ textFieldValueByType(callback, args(0), args(1));
401
402
  break;
402
- case "getTextFieldValueByTypeLcid":
403
- getTextFieldValueByTypeLcid(callback, args(0), args(1), args(2));
403
+ case "textFieldValueByTypeLcid":
404
+ textFieldValueByTypeLcid(callback, args(0), args(1), args(2));
404
405
  break;
405
- case "getTextFieldValueByTypeSource":
406
- getTextFieldValueByTypeSource(callback, args(0), args(1), args(2));
406
+ case "textFieldValueByTypeSource":
407
+ textFieldValueByTypeSource(callback, args(0), args(1), args(2));
407
408
  break;
408
- case "getTextFieldValueByTypeLcidSource":
409
- getTextFieldValueByTypeLcidSource(callback, args(0), args(1), args(2), args(3));
409
+ case "textFieldValueByTypeLcidSource":
410
+ textFieldValueByTypeLcidSource(callback, args(0), args(1), args(2), args(3));
410
411
  break;
411
- case "getTextFieldValueByTypeSourceOriginal":
412
- getTextFieldValueByTypeSourceOriginal(callback, args(0), args(1), args(2), args(3));
412
+ case "textFieldValueByTypeSourceOriginal":
413
+ textFieldValueByTypeSourceOriginal(callback, args(0), args(1), args(2), args(3));
413
414
  break;
414
- case "getTextFieldValueByTypeLcidSourceOriginal":
415
- getTextFieldValueByTypeLcidSourceOriginal(callback, args(0), args(1), args(2), args(3), args(4));
415
+ case "textFieldValueByTypeLcidSourceOriginal":
416
+ textFieldValueByTypeLcidSourceOriginal(callback, args(0), args(1), args(2), args(3), args(4));
416
417
  break;
417
- case "getTextFieldByType":
418
- getTextFieldByType(callback, args(0), args(1));
418
+ case "textFieldByType":
419
+ textFieldByType(callback, args(0), args(1));
419
420
  break;
420
- case "getTextFieldByTypeLcid":
421
- getTextFieldByTypeLcid(callback, args(0), args(1), args(2));
421
+ case "textFieldByTypeLcid":
422
+ textFieldByTypeLcid(callback, args(0), args(1), args(2));
422
423
  break;
423
- case "getGraphicFieldByTypeSource":
424
- getGraphicFieldByTypeSource(callback, args(0), args(1), args(2));
424
+ case "graphicFieldByTypeSource":
425
+ graphicFieldByTypeSource(callback, args(0), args(1), args(2));
425
426
  break;
426
- case "getGraphicFieldByTypeSourcePageIndex":
427
- getGraphicFieldByTypeSourcePageIndex(callback, args(0), args(1), args(2), args(3));
427
+ case "graphicFieldByTypeSourcePageIndex":
428
+ graphicFieldByTypeSourcePageIndex(callback, args(0), args(1), args(2), args(3));
428
429
  break;
429
- case "getGraphicFieldByTypeSourcePageIndexLight":
430
- getGraphicFieldByTypeSourcePageIndexLight(callback, args(0), args(1), args(2), args(3), args(4));
430
+ case "graphicFieldByTypeSourcePageIndexLight":
431
+ graphicFieldByTypeSourcePageIndexLight(callback, args(0), args(1), args(2), args(3), args(4));
431
432
  break;
432
- case "getGraphicFieldImageByType":
433
- getGraphicFieldImageByType(callback, args(0), args(1));
433
+ case "graphicFieldImageByType":
434
+ graphicFieldImageByType(callback, args(0), args(1));
434
435
  break;
435
- case "getGraphicFieldImageByTypeSource":
436
- getGraphicFieldImageByTypeSource(callback, args(0), args(1), args(2));
436
+ case "graphicFieldImageByTypeSource":
437
+ graphicFieldImageByTypeSource(callback, args(0), args(1), args(2));
437
438
  break;
438
- case "getGraphicFieldImageByTypeSourcePageIndex":
439
- getGraphicFieldImageByTypeSourcePageIndex(callback, args(0), args(1), args(2), args(3));
439
+ case "graphicFieldImageByTypeSourcePageIndex":
440
+ graphicFieldImageByTypeSourcePageIndex(callback, args(0), args(1), args(2), args(3));
440
441
  break;
441
- case "getGraphicFieldImageByTypeSourcePageIndexLight":
442
- getGraphicFieldImageByTypeSourcePageIndexLight(callback, args(0), args(1), args(2), args(3), args(4));
442
+ case "graphicFieldImageByTypeSourcePageIndexLight":
443
+ graphicFieldImageByTypeSourcePageIndexLight(callback, args(0), args(1), args(2), args(3), args(4));
443
444
  break;
444
- case "getContainers":
445
- getContainers(callback, args(0), args(1));
445
+ case "containers":
446
+ containers(callback, args(0), args(1));
446
447
  break;
447
- case "getEncryptedContainers":
448
- getEncryptedContainers(callback, args(0));
448
+ case "encryptedContainers":
449
+ encryptedContainers(callback, args(0));
449
450
  break;
450
451
  }
451
452
  } catch (Exception e) {
@@ -464,8 +465,10 @@ public class DocumentReader extends CordovaPlugin {
464
465
  };
465
466
  Intent intent = new Intent(activity.getApplicationContext(), activity.getClass());
466
467
  intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
467
- @SuppressLint("UnspecifiedImmutableFlag")
468
- PendingIntent pendingIntent = PendingIntent.getActivity(activity.getApplicationContext(), 0, intent, 0);
468
+ int flags = 0;
469
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
470
+ flags = PendingIntent.FLAG_IMMUTABLE;
471
+ PendingIntent pendingIntent = PendingIntent.getActivity(activity.getApplicationContext(), 0, intent, flags);
469
472
  NfcAdapter.getDefaultAdapter(getActivity()).enableForegroundDispatch(activity, pendingIntent, filters, techList);
470
473
  }
471
474
 
@@ -516,6 +519,7 @@ public class DocumentReader extends CordovaPlugin {
516
519
  callback.success();
517
520
  }
518
521
 
522
+ @SuppressLint("MissingPermission")
519
523
  private void initializeReaderBleDeviceConfig(Callback callback) {
520
524
  if (BluetoothUtil.Companion.getBleManager() == null) callback.error("bleManager is null");
521
525
  if (!Instance().isReady())
@@ -833,37 +837,37 @@ public class DocumentReader extends CordovaPlugin {
833
837
  callback.success();
834
838
  }
835
839
 
836
- private void getTextFieldValueByType(Callback callback, String raw, int fieldType) {
840
+ private void textFieldValueByType(Callback callback, String raw, int fieldType) {
837
841
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
838
842
  callback.success(results.getTextFieldValueByType(fieldType));
839
843
  }
840
844
 
841
- private void getTextFieldValueByTypeLcid(Callback callback, String raw, int fieldType, int lcid) {
845
+ private void textFieldValueByTypeLcid(Callback callback, String raw, int fieldType, int lcid) {
842
846
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
843
847
  callback.success(results.getTextFieldValueByType(fieldType, lcid));
844
848
  }
845
849
 
846
- private void getTextFieldValueByTypeSource(Callback callback, String raw, int fieldType, int source) {
850
+ private void textFieldValueByTypeSource(Callback callback, String raw, int fieldType, int source) {
847
851
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
848
852
  callback.success(results.getTextFieldValueByTypeAndSource(fieldType, source));
849
853
  }
850
854
 
851
- private void getTextFieldValueByTypeLcidSource(Callback callback, String raw, int fieldType, int lcid, int source) {
855
+ private void textFieldValueByTypeLcidSource(Callback callback, String raw, int fieldType, int lcid, int source) {
852
856
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
853
857
  callback.success(results.getTextFieldValueByType(fieldType, lcid, source));
854
858
  }
855
859
 
856
- private void getTextFieldValueByTypeSourceOriginal(Callback callback, String raw, int fieldType, int source, boolean original) {
860
+ private void textFieldValueByTypeSourceOriginal(Callback callback, String raw, int fieldType, int source, boolean original) {
857
861
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
858
862
  callback.success(results.getTextFieldValueByTypeAndSource(fieldType, source, original));
859
863
  }
860
864
 
861
- private void getTextFieldValueByTypeLcidSourceOriginal(Callback callback, String raw, int fieldType, int lcid, int source, boolean original) {
865
+ private void textFieldValueByTypeLcidSourceOriginal(Callback callback, String raw, int fieldType, int lcid, int source, boolean original) {
862
866
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
863
867
  callback.success(results.getTextFieldValueByType(fieldType, lcid, source, original));
864
868
  }
865
869
 
866
- private void getTextFieldByType(Callback callback, String raw, int fieldType) {
870
+ private void textFieldByType(Callback callback, String raw, int fieldType) {
867
871
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
868
872
  DocumentReaderTextField result = results.getTextFieldByType(fieldType);
869
873
  if (result == null)
@@ -872,7 +876,7 @@ public class DocumentReader extends CordovaPlugin {
872
876
  callback.success(JSONConstructor.generateDocumentReaderTextField(result, getContext()).toString());
873
877
  }
874
878
 
875
- private void getTextFieldByTypeLcid(Callback callback, String raw, int fieldType, int lcid) {
879
+ private void textFieldByTypeLcid(Callback callback, String raw, int fieldType, int lcid) {
876
880
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
877
881
  DocumentReaderTextField result = results.getTextFieldByType(fieldType, lcid);
878
882
  if (result == null)
@@ -881,7 +885,7 @@ public class DocumentReader extends CordovaPlugin {
881
885
  callback.success(JSONConstructor.generateDocumentReaderTextField(result, getContext()).toString());
882
886
  }
883
887
 
884
- private void getGraphicFieldByTypeSource(Callback callback, String raw, int fieldType, int source) {
888
+ private void graphicFieldByTypeSource(Callback callback, String raw, int fieldType, int source) {
885
889
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
886
890
  DocumentReaderGraphicField result = results.getGraphicFieldByType(fieldType, source);
887
891
  if (result == null)
@@ -890,7 +894,7 @@ public class DocumentReader extends CordovaPlugin {
890
894
  callback.success(JSONConstructor.generateDocumentReaderGraphicField(result, getContext()).toString());
891
895
  }
892
896
 
893
- private void getGraphicFieldByTypeSourcePageIndex(Callback callback, String raw, int fieldType, int source, int pageIndex) {
897
+ private void graphicFieldByTypeSourcePageIndex(Callback callback, String raw, int fieldType, int source, int pageIndex) {
894
898
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
895
899
  DocumentReaderGraphicField result = results.getGraphicFieldByType(fieldType, source, pageIndex);
896
900
  if (result == null)
@@ -899,7 +903,7 @@ public class DocumentReader extends CordovaPlugin {
899
903
  callback.success(JSONConstructor.generateDocumentReaderGraphicField(result, getContext()).toString());
900
904
  }
901
905
 
902
- private void getGraphicFieldByTypeSourcePageIndexLight(Callback callback, String raw, int fieldType, int source, int pageIndex, int light) {
906
+ private void graphicFieldByTypeSourcePageIndexLight(Callback callback, String raw, int fieldType, int source, int pageIndex, int light) {
903
907
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
904
908
  DocumentReaderGraphicField result = results.getGraphicFieldByType(fieldType, source, pageIndex, light);
905
909
  if (result == null)
@@ -908,28 +912,28 @@ public class DocumentReader extends CordovaPlugin {
908
912
  callback.success(JSONConstructor.generateDocumentReaderGraphicField(result, getContext()).toString());
909
913
  }
910
914
 
911
- private void getGraphicFieldImageByType(Callback callback, String raw, int fieldType) {
915
+ private void graphicFieldImageByType(Callback callback, String raw, int fieldType) {
912
916
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
913
917
  callback.success(Helpers.bitmapToBase64String(results.getGraphicFieldImageByType(fieldType)));
914
918
  }
915
919
 
916
- private void getGraphicFieldImageByTypeSource(Callback callback, String raw, int fieldType, int source) {
920
+ private void graphicFieldImageByTypeSource(Callback callback, String raw, int fieldType, int source) {
917
921
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
918
922
  callback.success(Helpers.bitmapToBase64String(results.getGraphicFieldImageByType(fieldType, source)));
919
923
  }
920
924
 
921
- private void getGraphicFieldImageByTypeSourcePageIndex(Callback callback, String raw, int fieldType, int source, int pageIndex) {
925
+ private void graphicFieldImageByTypeSourcePageIndex(Callback callback, String raw, int fieldType, int source, int pageIndex) {
922
926
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
923
927
  callback.success(Helpers.bitmapToBase64String(results.getGraphicFieldImageByType(fieldType, source, pageIndex)));
924
928
  }
925
929
 
926
- private void getGraphicFieldImageByTypeSourcePageIndexLight(Callback callback, String raw, int fieldType, int source, int pageIndex, int light) {
930
+ private void graphicFieldImageByTypeSourcePageIndexLight(Callback callback, String raw, int fieldType, int source, int pageIndex, int light) {
927
931
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
928
932
  callback.success(Helpers.bitmapToBase64String(results.getGraphicFieldImageByType(fieldType, source, pageIndex, light)));
929
933
  }
930
934
 
931
935
  @SuppressLint("WrongConstant")
932
- private void getContainers(Callback callback, String raw, JSONArray resultType) {
936
+ private void containers(Callback callback, String raw, JSONArray resultType) {
933
937
  try {
934
938
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
935
939
  callback.success(results.getContainers(JSONConstructor.intArrayFromJSON(resultType)));
@@ -939,7 +943,7 @@ public class DocumentReader extends CordovaPlugin {
939
943
  }
940
944
  }
941
945
 
942
- private void getEncryptedContainers(Callback callback, String raw) {
946
+ private void encryptedContainers(Callback callback, String raw) {
943
947
  DocumentReaderResults results = DocumentReaderResults.fromRawResults(raw);
944
948
  callback.success(results.getEncryptedContainers());
945
949
  }
@@ -194,18 +194,18 @@ class JSONConstructor {
194
194
  try {
195
195
  result.put("action", action);
196
196
  switch (action) {
197
- case DocReaderAction.PROCESS:
198
- case DocReaderAction.PROCESS_WHITE_UV_IMAGES:
199
- break;
200
- case DocReaderAction.NOTIFICATION:
201
- result.put("results", generateDocumentReaderResultsNotification(results));
202
- break;
203
197
  case DocReaderAction.COMPLETE:
204
198
  case DocReaderAction.MORE_PAGES_AVAILABLE:
205
199
  case DocReaderAction.CANCEL:
206
200
  case DocReaderAction.ERROR:
201
+ case DocReaderAction.TIMEOUT:
207
202
  result.put("results", generateDocumentReaderResults(results, context));
208
203
  break;
204
+ case DocReaderAction.NOTIFICATION:
205
+ result.put("results", generateDocumentReaderResultsNotification(results));
206
+ break;
207
+ default:
208
+ break;
209
209
  }
210
210
  if (error != null)
211
211
  result.put("error", generateDocumentReaderException(error));
@@ -478,6 +478,8 @@ class JSONConstructor {
478
478
  result.put("values", generateList(input.values, JSONConstructor::generateDocumentReaderValue, context));
479
479
  result.put("comparisonList", generateList(input.comparisonList, JSONConstructor::generateDocumentReaderComparison));
480
480
  result.put("validityList", generateList(input.validityList, JSONConstructor::generateDocumentReaderValidity));
481
+ result.put("comparisonStatus", input.comparisonStatus);
482
+ result.put("validityStatus", input.validityStatus);
481
483
  } catch (JSONException e) {
482
484
  e.printStackTrace();
483
485
  }
@@ -589,9 +591,11 @@ class JSONConstructor {
589
591
  JSONObject result = new JSONObject();
590
592
  if (input == null) return null;
591
593
  try {
592
- result.put("code", input.getNotificationCode());
593
- result.put("attachment", input.getDataFileType());
594
- result.put("value", input.getProgress());
594
+ result.put("code", input.code);
595
+ result.put("value", input.value);
596
+ result.put("notificationCode", input.getNotificationCode());
597
+ result.put("dataFileType", input.getDataFileType());
598
+ result.put("progress", input.getProgress());
595
599
  } catch (JSONException e) {
596
600
  e.printStackTrace();
597
601
  }
@@ -1158,7 +1162,9 @@ class JSONConstructor {
1158
1162
  JSONObject result = new JSONObject();
1159
1163
  if (input == null) return null;
1160
1164
  try {
1165
+ result.put("videoCaptureSessionId", input.videoCaptureSessionId);
1161
1166
  result.put("chipPage", input.chipPage);
1167
+ result.put("irElapsedTime", input.irElapsedTime);
1162
1168
  result.put("processingFinishedStatus", input.processingFinishedStatus);
1163
1169
  result.put("elapsedTime", input.elapsedTime);
1164
1170
  result.put("elapsedTimeRFID", input.elapsedTimeRFID);
@@ -1176,6 +1182,7 @@ class JSONConstructor {
1176
1182
  result.put("rfidSessionData", generateRFIDSessionData(input.rfidSessionData));
1177
1183
  result.put("authenticityResult", generateDocumentReaderAuthenticityResult(input.authenticityResult, context));
1178
1184
  result.put("barcodeResult", generateDocumentReaderBarcodeResult(input.barcodeResult));
1185
+ result.put("ppmIn", input.ppmIn);
1179
1186
  result.put("documentType", generateList(input.documentType, JSONConstructor::generateDocumentReaderDocumentType));
1180
1187
  result.put("status", generateDocumentReaderResultsStatus(input.status));
1181
1188
  result.put("vdsncData", generateVDSNCData(input.vdsncData));
@@ -227,6 +227,8 @@ class RegulaConfig {
227
227
  processParams.respectImageQuality = opts.getBoolean("respectImageQuality");
228
228
  if (opts.has("splitNames"))
229
229
  processParams.splitNames = opts.getBoolean("splitNames");
230
+ if (opts.has("convertCase"))
231
+ processParams.convertCase = opts.getInt("convertCase");
230
232
  }
231
233
 
232
234
  private static void setCustomization(ParamsCustomization customization, JSONObject opts, Context context) throws JSONException {
@@ -516,6 +518,7 @@ class RegulaConfig {
516
518
  object.put("documentGroupFilter", generateIntArray(processParams.documentGroupFilter));
517
519
  object.put("respectImageQuality", processParams.respectImageQuality);
518
520
  object.put("splitNames", processParams.splitNames);
521
+ object.put("convertCase", processParams.convertCase);
519
522
 
520
523
  return object;
521
524
  }
@@ -8,7 +8,7 @@ repositories {
8
8
 
9
9
  dependencies {
10
10
  //noinspection GradleDependency
11
- implementation ('com.regula.documentreader:api:6.6.8072'){
11
+ implementation ('com.regula.documentreader:api:6.7.8311'){
12
12
  transitive = true
13
13
  }
14
14
  }