@regulaforensics/cordova-plugin-document-reader-api 6.3.1 → 6.4.0
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.
- package/.github/ISSUE_TEMPLATE/bug-report.md +39 -0
- package/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/.github/ISSUE_TEMPLATE/feature-request.md +20 -0
- package/example/package.json +2 -2
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/src/android/DocumentReader.java +20 -15
- package/src/android/JSONConstructor.java +54 -0
- package/src/android/RegulaConfig.java +6 -0
- package/src/android/build.gradle +1 -1
- package/src/ios/RGLDocumentReader.m +17 -10
- package/src/ios/RGLWJSONConstructor.h +1 -0
- package/src/ios/RGLWJSONConstructor.m +46 -3
- package/src/ios/RegulaConfig.m +3 -0
- package/www/DocumentReader.js +80 -34
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: "[BR] "
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Before Submitting, be sure to**
|
|
11
|
+
- [ ] Update to the latest stable version.
|
|
12
|
+
- [ ] Read and follow the guides described in the [documentation](https://docs.regulaforensics.com?utm_source=github).
|
|
13
|
+
- [ ] Try to reproduce in our demo project.
|
|
14
|
+
- [ ] Search for your issue in the existing GitHub issues.
|
|
15
|
+
|
|
16
|
+
**Bug Description**
|
|
17
|
+
<!--A clear and concise description of what the bug is.-->
|
|
18
|
+
|
|
19
|
+
**Steps To Reproduce**
|
|
20
|
+
<!--
|
|
21
|
+
1. Go to '...'
|
|
22
|
+
2. Click on '....'
|
|
23
|
+
3. Scroll down to '....'
|
|
24
|
+
4. See error
|
|
25
|
+
-->
|
|
26
|
+
|
|
27
|
+
**Expected behavior**
|
|
28
|
+
<!--A clear and concise description of what you expected to happen.-->
|
|
29
|
+
|
|
30
|
+
**Screenshots**
|
|
31
|
+
<!--If applicable, add screenshots to help explain your issue.-->
|
|
32
|
+
|
|
33
|
+
**Environment:**
|
|
34
|
+
- Device: <!--[e.g. iPhone 12]-->
|
|
35
|
+
- OS: <!--[e.g. iOS]-->
|
|
36
|
+
- OS version: <!--[e.g. 10.0]-->
|
|
37
|
+
|
|
38
|
+
**Additional context**
|
|
39
|
+
<!--Add any other context about the problem here.-->
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest an idea for this product
|
|
4
|
+
title: "[FR] "
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
<!--A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]-->
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
<!--A clear and concise description of what you want to happen.-->
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
<!--A clear and concise description of any alternative solutions or features you've considered.-->
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
<!--Add any other context or screenshots about the feature request here.-->
|
package/example/package.json
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"cordova-android": "^9.0.0",
|
|
17
17
|
"cordova-ios": "^6.1.1",
|
|
18
18
|
"cordova-plugin-add-swift-support": "^2.0.2",
|
|
19
|
-
"@regulaforensics/cordova-plugin-document-reader-api": "^6.
|
|
20
|
-
"@regulaforensics/cordova-plugin-document-reader-core-fullrfid": "^6.
|
|
19
|
+
"@regulaforensics/cordova-plugin-document-reader-api": "^6.4.0",
|
|
20
|
+
"@regulaforensics/cordova-plugin-document-reader-core-fullrfid": "^6.4.0",
|
|
21
21
|
"cordova-plugin-file": "^6.0.2",
|
|
22
22
|
"cordova-plugin-image-picker": "^1.1.3",
|
|
23
23
|
"cordova-plugin-android-permissions": "1.1.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/cordova-plugin-document-reader-api",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
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.
|
|
2
|
+
<plugin id="cordova-plugin-document-reader-api" version="6.4.0"
|
|
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>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<podspec>
|
|
26
26
|
<config/>
|
|
27
27
|
<pods>
|
|
28
|
-
<pod name="DocumentReader" spec="~> 6.
|
|
28
|
+
<pod name="DocumentReader" spec="~> 6.4.2552" />
|
|
29
29
|
</pods>
|
|
30
30
|
</podspec>
|
|
31
31
|
</platform>
|
|
@@ -9,7 +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
|
|
12
|
+
import androidx.annotation.NonNull;
|
|
13
13
|
import android.os.Bundle;
|
|
14
14
|
import android.util.Base64;
|
|
15
15
|
|
|
@@ -24,6 +24,7 @@ import com.regula.documentreader.api.enums.DocReaderAction;
|
|
|
24
24
|
import com.regula.documentreader.api.errors.DocumentReaderException;
|
|
25
25
|
import com.regula.documentreader.api.internal.core.CoreScenarioUtil;
|
|
26
26
|
import com.regula.documentreader.api.params.DocReaderConfig;
|
|
27
|
+
import com.regula.documentreader.api.params.ImageInputData;
|
|
27
28
|
import com.regula.documentreader.api.params.ImageInputParam;
|
|
28
29
|
import com.regula.documentreader.api.params.rfid.PKDCertificate;
|
|
29
30
|
import com.regula.documentreader.api.params.rfid.authorization.PAResourcesIssuer;
|
|
@@ -227,6 +228,9 @@ public class DocumentReader extends CordovaPlugin {
|
|
|
227
228
|
case "stopRFIDReader":
|
|
228
229
|
stopRFIDReader(callback);
|
|
229
230
|
break;
|
|
231
|
+
case "stopRFIDReaderWithErrorMessage":
|
|
232
|
+
stopRFIDReaderWithErrorMessage(callback, args(0));
|
|
233
|
+
break;
|
|
230
234
|
case "stopScanner":
|
|
231
235
|
stopScanner(callback);
|
|
232
236
|
break;
|
|
@@ -332,9 +336,6 @@ public class DocumentReader extends CordovaPlugin {
|
|
|
332
336
|
case "initializeReaderWithDatabase":
|
|
333
337
|
initializeReaderWithDatabase(callback, args(0), args(1));
|
|
334
338
|
break;
|
|
335
|
-
case "recognizeImageFrame":
|
|
336
|
-
recognizeImageFrame(callback, args(0), args(1));
|
|
337
|
-
break;
|
|
338
339
|
case "recognizeImageWithOpts":
|
|
339
340
|
recognizeImageWithOpts(callback, args(0), args(1));
|
|
340
341
|
break;
|
|
@@ -344,12 +345,12 @@ public class DocumentReader extends CordovaPlugin {
|
|
|
344
345
|
case "showScannerWithCameraIDAndOpts":
|
|
345
346
|
showScannerWithCameraIDAndOpts(callback, args(0), args(1));
|
|
346
347
|
break;
|
|
347
|
-
case "recognizeImageWithImageInputParams":
|
|
348
|
-
recognizeImageWithImageInputParams(callback, args(0), args(1));
|
|
349
|
-
break;
|
|
350
348
|
case "recognizeImageWithCameraMode":
|
|
351
349
|
recognizeImageWithCameraMode(callback, args(0), args(1));
|
|
352
350
|
break;
|
|
351
|
+
case "recognizeImagesWithImageInputs":
|
|
352
|
+
recognizeImagesWithImageInputs(callback, args(0));
|
|
353
|
+
break;
|
|
353
354
|
}
|
|
354
355
|
} catch (Exception ignored) {
|
|
355
356
|
}
|
|
@@ -523,10 +524,6 @@ public class DocumentReader extends CordovaPlugin {
|
|
|
523
524
|
callback.success();
|
|
524
525
|
}
|
|
525
526
|
|
|
526
|
-
private void recognizeImageWithImageInputParams(@SuppressWarnings("unused") Callback callback, String base64Image, final JSONObject params) throws JSONException {
|
|
527
|
-
Instance().recognizeImage(Helpers.bitmapFromBase64(base64Image), new ImageInputParam(params.getInt("width"), params.getInt("height"), params.getInt("type")), getCompletion());
|
|
528
|
-
}
|
|
529
|
-
|
|
530
527
|
private void recognizeImageWithOpts(Callback callback, String base64Image, final JSONObject opts) throws JSONException {
|
|
531
528
|
RegulaConfig.setConfig(Instance(), opts, getContext());
|
|
532
529
|
recognizeImage(callback, base64Image);
|
|
@@ -545,6 +542,14 @@ public class DocumentReader extends CordovaPlugin {
|
|
|
545
542
|
Instance().recognizeImages(images, getCompletion());
|
|
546
543
|
}
|
|
547
544
|
|
|
545
|
+
private void recognizeImagesWithImageInputs(@SuppressWarnings("unused") Callback callback, JSONArray base64Images) throws JSONException {
|
|
546
|
+
stopBackgroundRFID();
|
|
547
|
+
ImageInputData[] images = new ImageInputData[base64Images.length()];
|
|
548
|
+
for (int i = 0; i < images.length; i++)
|
|
549
|
+
images[i] = JSONConstructor.ImageInputDataFromJSON(base64Images.getJSONObject(i));
|
|
550
|
+
Instance().recognizeImages(images, getCompletion());
|
|
551
|
+
}
|
|
552
|
+
|
|
548
553
|
private void removeDatabase(Callback callback) {
|
|
549
554
|
callback.success(Instance().removeDatabase(getContext()));
|
|
550
555
|
}
|
|
@@ -578,10 +583,6 @@ public class DocumentReader extends CordovaPlugin {
|
|
|
578
583
|
callback.success();
|
|
579
584
|
}
|
|
580
585
|
|
|
581
|
-
private void recognizeImageFrame(@SuppressWarnings("unused") Callback callback, String base64Image, final JSONObject opts) throws JSONException {
|
|
582
|
-
Instance().recognizeImageFrame(Helpers.bitmapFromBase64(base64Image), new ImageInputParam(opts.getInt("width"), opts.getInt("height"), opts.getInt("type")), getCompletion());
|
|
583
|
-
}
|
|
584
|
-
|
|
585
586
|
private void recognizeVideoFrame(@SuppressWarnings("unused") Callback callback, String byteString, final JSONObject opts) throws JSONException {
|
|
586
587
|
stopBackgroundRFID();
|
|
587
588
|
Instance().recognizeVideoFrame(byteString.getBytes(), new ImageInputParam(opts.getInt("width"), opts.getInt("height"), opts.getInt("type")), getCompletion());
|
|
@@ -700,6 +701,10 @@ public class DocumentReader extends CordovaPlugin {
|
|
|
700
701
|
callback.error("getCameraSessionIsPaused() is an ios-only method");
|
|
701
702
|
}
|
|
702
703
|
|
|
704
|
+
private void stopRFIDReaderWithErrorMessage(Callback callback, String message) {
|
|
705
|
+
callback.error("stopRFIDReaderWithErrorMessage() is an ios-only method");
|
|
706
|
+
}
|
|
707
|
+
|
|
703
708
|
@SuppressWarnings("unused")
|
|
704
709
|
private void recognizeImageWithCameraMode(Callback callback, String base64, boolean mode) {
|
|
705
710
|
callback.error("recognizeImageWithCameraMode() is an ios-only method");
|
|
@@ -16,6 +16,7 @@ import com.regula.documentreader.api.enums.eRPRM_Lights;
|
|
|
16
16
|
import com.regula.documentreader.api.errors.DocumentReaderException;
|
|
17
17
|
import com.regula.documentreader.api.internal.core.CoreDetailedScenario;
|
|
18
18
|
import com.regula.documentreader.api.params.FaceMetaData;
|
|
19
|
+
import com.regula.documentreader.api.params.ImageInputData;
|
|
19
20
|
import com.regula.documentreader.api.params.rfid.TccParams;
|
|
20
21
|
import com.regula.documentreader.api.params.rfid.authorization.PAAttribute;
|
|
21
22
|
import com.regula.documentreader.api.params.rfid.authorization.PAResourcesIssuer;
|
|
@@ -360,6 +361,42 @@ class JSONConstructor {
|
|
|
360
361
|
return result;
|
|
361
362
|
}
|
|
362
363
|
|
|
364
|
+
static ImageInputData ImageInputDataFromJSON(JSONObject input) {
|
|
365
|
+
ImageInputData result = new ImageInputData(null);
|
|
366
|
+
int pageIndex = 0;
|
|
367
|
+
int light = 6;
|
|
368
|
+
int type = 254;
|
|
369
|
+
int width = 0;
|
|
370
|
+
int height = 0;
|
|
371
|
+
Bitmap bitmap;
|
|
372
|
+
byte[] imgBytes;
|
|
373
|
+
|
|
374
|
+
try {
|
|
375
|
+
if(input.has("pageIndex"))
|
|
376
|
+
pageIndex = input.optInt("pageIndex");
|
|
377
|
+
if(input.has("light"))
|
|
378
|
+
pageIndex = input.optInt("light");
|
|
379
|
+
if(input.has("type"))
|
|
380
|
+
pageIndex = input.optInt("type");
|
|
381
|
+
if (input.has("bitmap")) {
|
|
382
|
+
bitmap = Helpers.bitmapFromBase64(input.getString("bitmap"));
|
|
383
|
+
result = new ImageInputData(bitmap, light, pageIndex);
|
|
384
|
+
}
|
|
385
|
+
if (input.has("imgBytes")) {
|
|
386
|
+
JSONArray jsonArray_data = input.getJSONArray("data");
|
|
387
|
+
byte[] data = new byte[jsonArray_data.length()];
|
|
388
|
+
for (int i = 0; i < jsonArray_data.length(); i++)
|
|
389
|
+
data[i] = (byte) jsonArray_data.get(i);
|
|
390
|
+
imgBytes = data;
|
|
391
|
+
result = new ImageInputData(imgBytes, width, height, light, pageIndex);
|
|
392
|
+
}
|
|
393
|
+
} catch (JSONException e) {
|
|
394
|
+
e.printStackTrace();
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
return result;
|
|
398
|
+
}
|
|
399
|
+
|
|
363
400
|
static Throwable ThrowableFromJSON(JSONObject jsonObject) {
|
|
364
401
|
return new Throwable();
|
|
365
402
|
}
|
|
@@ -1184,6 +1221,23 @@ class JSONConstructor {
|
|
|
1184
1221
|
return result;
|
|
1185
1222
|
}
|
|
1186
1223
|
|
|
1224
|
+
static JSONObject generateImageInputData(ImageInputData input) {
|
|
1225
|
+
JSONObject result = new JSONObject();
|
|
1226
|
+
if (input == null) return result;
|
|
1227
|
+
try {
|
|
1228
|
+
result.put("pageIndex", input.getPageIndex());
|
|
1229
|
+
result.put("light", input.getLight());
|
|
1230
|
+
result.put("type", input.getType());
|
|
1231
|
+
result.put("width", input.getWidth());
|
|
1232
|
+
result.put("height", input.getHeight());
|
|
1233
|
+
result.put("bitmap", generateBitmap(input.getBitmap()));
|
|
1234
|
+
result.put("imgBytes", generateByteArray(input.getImgBytes()));
|
|
1235
|
+
} catch (JSONException e) {
|
|
1236
|
+
e.printStackTrace();
|
|
1237
|
+
}
|
|
1238
|
+
return result;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1187
1241
|
static JSONObject generateDocumentReaderResults(DocumentReaderResults input, Context context) {
|
|
1188
1242
|
JSONObject result = new JSONObject();
|
|
1189
1243
|
if (input == null) return result;
|
|
@@ -103,6 +103,8 @@ class RegulaConfig {
|
|
|
103
103
|
editor.setManualMultipageMode(opts.getBoolean("manualMultipageMode"));
|
|
104
104
|
if (opts.has("exposure"))
|
|
105
105
|
editor.setExposure(BigDecimal.valueOf(opts.getDouble("exposure")).floatValue());
|
|
106
|
+
if (opts.has("rfidTimeout"))
|
|
107
|
+
editor.setRfidTimeout(opts.getInt("rfidTimeout"));
|
|
106
108
|
|
|
107
109
|
editor.apply();
|
|
108
110
|
}
|
|
@@ -331,6 +333,8 @@ class RegulaConfig {
|
|
|
331
333
|
editor.setHologramAnimationImageMatrix(matrixFromFloatArray(floatArrayFromJson(opts.getJSONArray("hologramAnimationImageMatrix"))));
|
|
332
334
|
if (opts.has("hologramAnimationImageScaleType"))
|
|
333
335
|
editor.setHologramAnimationImageScaleType(ScaleType.valueOf(opts.getString("hologramAnimationImageScaleType")));
|
|
336
|
+
if (opts.has("uiCustomizationLayer"))
|
|
337
|
+
editor.setUiCustomizationLayer(opts.getJSONObject("uiCustomizationLayer"));
|
|
334
338
|
|
|
335
339
|
editor.applyImmediately(context);
|
|
336
340
|
}
|
|
@@ -371,6 +375,7 @@ class RegulaConfig {
|
|
|
371
375
|
object.put("recordScanningProcess", functionality.doRecordProcessingVideo());
|
|
372
376
|
object.put("manualMultipageMode", functionality.isManualMultipageMode());
|
|
373
377
|
object.put("exposure", functionality.getExposure());
|
|
378
|
+
object.put("rfidTimeout", functionality.getRfidTimeout());
|
|
374
379
|
|
|
375
380
|
return object;
|
|
376
381
|
}
|
|
@@ -435,6 +440,7 @@ class RegulaConfig {
|
|
|
435
440
|
object.put("hologramAnimationPositionMultiplier", customization.getHologramAnimationPositionMultiplier());
|
|
436
441
|
object.put("hologramAnimationImageMatrix", customization.getHologramAnimationImageMatrix());
|
|
437
442
|
object.put("hologramAnimationImageScaleType", customization.getHologramAnimationImageScaleType());
|
|
443
|
+
object.put("uiCustomizationLayer", customization.getUiCustomizationLayer());
|
|
438
444
|
|
|
439
445
|
return object;
|
|
440
446
|
}
|
package/src/android/build.gradle
CHANGED
|
@@ -178,6 +178,8 @@ typedef void (^Callback)(NSString* response);
|
|
|
178
178
|
[self startRFIDReader :successCallback :errorCallback];
|
|
179
179
|
else if([action isEqualToString:@"stopRFIDReader"])
|
|
180
180
|
[self stopRFIDReader :successCallback :errorCallback];
|
|
181
|
+
else if([action isEqualToString:@"stopRFIDReaderWithErrorMessage"])
|
|
182
|
+
[self stopRFIDReaderWithErrorMessage :[args objectAtIndex:0] :successCallback :errorCallback];
|
|
181
183
|
else if([action isEqualToString:@"stopScanner"])
|
|
182
184
|
[self stopScanner :successCallback :errorCallback];
|
|
183
185
|
else if([action isEqualToString:@"deinitializeReader"])
|
|
@@ -248,18 +250,16 @@ typedef void (^Callback)(NSString* response);
|
|
|
248
250
|
[self setTCCParams :[args objectAtIndex:0] :successCallback :errorCallback];
|
|
249
251
|
else if([action isEqualToString:@"initializeReaderWithDatabase"])
|
|
250
252
|
[self initializeReaderWithDatabase :[args objectAtIndex:0] :[args objectAtIndex:1] :successCallback :errorCallback];
|
|
251
|
-
else if([action isEqualToString:@"recognizeImageFrame"])
|
|
252
|
-
[self recognizeImageFrame :[args objectAtIndex:0] :[args objectAtIndex:1] :successCallback :errorCallback];
|
|
253
253
|
else if([action isEqualToString:@"recognizeImageWithOpts"])
|
|
254
254
|
[self recognizeImageWithOpts :[args objectAtIndex:0] :[args objectAtIndex:1] :successCallback :errorCallback];
|
|
255
255
|
else if([action isEqualToString:@"recognizeVideoFrame"])
|
|
256
256
|
[self recognizeVideoFrame :[args objectAtIndex:0] :[args objectAtIndex:1] :successCallback :errorCallback];
|
|
257
257
|
else if([action isEqualToString:@"showScannerWithCameraIDAndOpts"])
|
|
258
258
|
[self showScannerWithCameraIDAndOpts :[args objectAtIndex:0] :[args objectAtIndex:1] :successCallback :errorCallback];
|
|
259
|
-
else if([action isEqualToString:@"recognizeImageWithImageInputParams"])
|
|
260
|
-
[self recognizeImageWithImageInputParams :[args objectAtIndex:0] :[args objectAtIndex:1] :successCallback :errorCallback];
|
|
261
259
|
else if([action isEqualToString:@"recognizeImageWithCameraMode"])
|
|
262
260
|
[self recognizeImageWithCameraMode :[args objectAtIndex:0] :[args objectAtIndex:1] :successCallback :errorCallback];
|
|
261
|
+
else if([action isEqualToString:@"recognizeImagesWithImageInputs"])
|
|
262
|
+
[self recognizeImagesWithImageInputs :[args objectAtIndex:0] :successCallback :errorCallback];
|
|
263
263
|
else
|
|
264
264
|
[self result:[NSString stringWithFormat:@"%@/%@", @"method not implemented: ", action] :errorCallback];
|
|
265
265
|
}
|
|
@@ -282,8 +282,10 @@ typedef void (^Callback)(NSString* response);
|
|
|
282
282
|
[self result:@"showScannerWithCameraID() is an android-only method" :errorCallback];
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
- (void)
|
|
286
|
-
[
|
|
285
|
+
- (void) stopRFIDReaderWithErrorMessage:(NSMutableString*)message :(Callback)successCallback :(Callback)errorCallback{
|
|
286
|
+
[RGLDocReader.shared stopRFIDReaderWithErrorMessage:message completion:^() {
|
|
287
|
+
[self result:@"" :successCallback];
|
|
288
|
+
}];
|
|
287
289
|
}
|
|
288
290
|
|
|
289
291
|
- (void) recognizeImageWithOpts:(NSString*)base64 :(NSDictionary*)opts :(Callback)successCallback :(Callback)errorCallback{
|
|
@@ -298,10 +300,6 @@ typedef void (^Callback)(NSString* response);
|
|
|
298
300
|
[self result:@"showScannerWithCameraIDAndOpts() is an android-only method" :errorCallback];
|
|
299
301
|
}
|
|
300
302
|
|
|
301
|
-
- (void) recognizeImageWithImageInputParams:(NSString*)base64 :(NSDictionary*)params :(Callback)successCallback :(Callback)errorCallback{
|
|
302
|
-
[self result:@"recognizeImageWithImageInputParams() is an android-only method" :errorCallback];
|
|
303
|
-
}
|
|
304
|
-
|
|
305
303
|
- (void) getLicenseMessage:(Callback)successCallback :(Callback)errorCallback{
|
|
306
304
|
[self result:@"getLicenseMessage() is an android-only method" :successCallback];
|
|
307
305
|
}
|
|
@@ -367,6 +365,15 @@ typedef void (^Callback)(NSString* response);
|
|
|
367
365
|
});
|
|
368
366
|
}
|
|
369
367
|
|
|
368
|
+
- (void) recognizeImagesWithImageInputs:(NSArray*)input :(Callback)successCallback :(Callback)errorCallback{
|
|
369
|
+
NSMutableArray<RGLImageInput*>* images = [[NSMutableArray alloc] init];
|
|
370
|
+
for(__strong NSDictionary* image in input)
|
|
371
|
+
[images addObject:[RGLWJSONConstructor RGLImageInputFromJson: image]];
|
|
372
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
373
|
+
[RGLDocReader.shared recognizeImagesWithImageInputs:images completion:[self getCompletion]];
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
|
|
370
377
|
- (void) recognizeImageWithCameraMode:(NSMutableString*)base64 :(BOOL)cameraMode :(Callback)successCallback :(Callback)errorCallback{
|
|
371
378
|
[self recognizeImageWith :base64 :cameraMode :successCallback :errorCallback];
|
|
372
379
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
+(NSMutableDictionary* _Nonnull)generateNSDictionary:(NSDictionary<NSNumber*, NSNumber*>* _Nullable)input;
|
|
13
13
|
+(RGLPKDCertificate* _Nullable)RGLPKDCertificateFromJson:(NSDictionary* _Nullable) dict;
|
|
14
14
|
+(RGLTCCParams* _Nonnull)RGLTCCParamsFromJson:(NSDictionary* _Nonnull)input;
|
|
15
|
+
+(RGLImageInput* _Nonnull)RGLImageInputFromJson:(NSDictionary* _Nonnull)input;
|
|
15
16
|
+(NSInteger)generateDocReaderAction:(RGLDocReaderAction)action;
|
|
16
17
|
+(NSInteger)generateRFIDCompleteAction:(RGLRFIDCompleteAction)action;
|
|
17
18
|
+(NSInteger)generateRFIDNotificationAction:(RGLRFIDNotificationAction)action;
|
|
@@ -35,6 +35,20 @@
|
|
|
35
35
|
return [[RGLTCCParams alloc] initWithServiceTAURLString:serviceTAURLString servicePAURLString:servicePAURLString pfxCertURLString:pfxCertURLString pfxCertData: pfxCertData pfxPassPhrase:pfxPassPhrase];
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
+(RGLImageInput*)RGLImageInputFromJson:(NSDictionary*)input {
|
|
39
|
+
NSInteger pageIndex = 0;
|
|
40
|
+
if([input valueForKey:@"pageIndex"] != nil)
|
|
41
|
+
pageIndex = [[input valueForKey:@"pageIndex"] integerValue];
|
|
42
|
+
NSInteger light = 6;
|
|
43
|
+
if([input valueForKey:@"light"] != nil)
|
|
44
|
+
pageIndex = [[input valueForKey:@"light"] integerValue];
|
|
45
|
+
if([input valueForKey:@"bitmap"] != nil){
|
|
46
|
+
UIImage* image = [UIImage imageWithData:[[NSData alloc]initWithBase64EncodedString:[input valueForKey:@"bitmap"] options:NSDataBase64DecodingIgnoreUnknownCharacters]];
|
|
47
|
+
return [[RGLImageInput alloc] initWithImage:image light:light pageIndex:pageIndex];
|
|
48
|
+
}
|
|
49
|
+
return nil;
|
|
50
|
+
}
|
|
51
|
+
|
|
38
52
|
+(NSMutableDictionary*)generateCGPoint:(CGPoint)input {
|
|
39
53
|
NSMutableDictionary *result = [NSMutableDictionary new];
|
|
40
54
|
|
|
@@ -107,6 +121,9 @@
|
|
|
107
121
|
case RGLDocReaderActionError:
|
|
108
122
|
result = 3;
|
|
109
123
|
break;
|
|
124
|
+
case RGLDocReaderActionProcessTimeout:
|
|
125
|
+
result = 10;
|
|
126
|
+
break;
|
|
110
127
|
default:
|
|
111
128
|
break;
|
|
112
129
|
}
|
|
@@ -118,7 +135,7 @@
|
|
|
118
135
|
NSInteger result = 0;
|
|
119
136
|
switch (input) {
|
|
120
137
|
case RGLRFIDCompleteActionComplete:
|
|
121
|
-
result =
|
|
138
|
+
result = 999;
|
|
122
139
|
break;
|
|
123
140
|
case RGLRFIDCompleteActionError:
|
|
124
141
|
result = 3;
|
|
@@ -136,6 +153,29 @@
|
|
|
136
153
|
return result;
|
|
137
154
|
}
|
|
138
155
|
|
|
156
|
+
+(NSNumber*)generateRGLImageQualityCheckType:(RGLImageQualityCheckType)value {
|
|
157
|
+
if(value == RGLImageQualityCheckTypeImageGlares)
|
|
158
|
+
return @0;
|
|
159
|
+
else if(value == RGLImageQualityCheckTypeImageFocus)
|
|
160
|
+
return @1;
|
|
161
|
+
else if(value == RGLImageQualityCheckTypeImageResolution)
|
|
162
|
+
return @2;
|
|
163
|
+
else if(value == RGLImageQualityCheckTypeImageColorness)
|
|
164
|
+
return @3;
|
|
165
|
+
else if(value == RGLImageQualityCheckTypeImagePerspective)
|
|
166
|
+
return @4;
|
|
167
|
+
else if(value == RGLImageQualityCheckTypeImageBounds)
|
|
168
|
+
return @5;
|
|
169
|
+
else if(value == RGLImageQualityCheckTypeScreenCapture)
|
|
170
|
+
return @6;
|
|
171
|
+
else if(value == RGLImageQualityCheckTypePortrait)
|
|
172
|
+
return @7;
|
|
173
|
+
else if(value == RGLImageQualityCheckTypeHandwritten)
|
|
174
|
+
return @8;
|
|
175
|
+
else
|
|
176
|
+
return @0;
|
|
177
|
+
}
|
|
178
|
+
|
|
139
179
|
+(NSInteger)generateRFIDNotificationAction:(RGLRFIDNotificationAction)input {
|
|
140
180
|
return 5;
|
|
141
181
|
}
|
|
@@ -155,6 +195,9 @@
|
|
|
155
195
|
case 3:
|
|
156
196
|
result[@"results"] = [self generateRGLDocumentReaderResults:results];
|
|
157
197
|
break;
|
|
198
|
+
case 10:
|
|
199
|
+
result[@"results"] = [self generateRGLDocumentReaderResults:results];
|
|
200
|
+
break;
|
|
158
201
|
case 5:
|
|
159
202
|
result[@"results"] = [self generateResultsWithNotification:[self generateRGLRFIDNotify:notify]];
|
|
160
203
|
break;
|
|
@@ -164,7 +207,7 @@
|
|
|
164
207
|
case 8:
|
|
165
208
|
result[@"results"] = [self generateRGLDocumentReaderResults:results];
|
|
166
209
|
break;
|
|
167
|
-
case
|
|
210
|
+
case 999:
|
|
168
211
|
result[@"results"] = [self generateResultsWithRFID :results :1];
|
|
169
212
|
action = 1;
|
|
170
213
|
break;
|
|
@@ -400,7 +443,7 @@
|
|
|
400
443
|
NSMutableDictionary *result = [NSMutableDictionary new];
|
|
401
444
|
if(input == nil) return result;
|
|
402
445
|
|
|
403
|
-
result[@"type"] = input.type;
|
|
446
|
+
result[@"type"] = [self generateRGLImageQualityCheckType:input.type];
|
|
404
447
|
result[@"result"] = @(input.result);
|
|
405
448
|
result[@"featureType"] = @(input.featureType);
|
|
406
449
|
result[@"boundRects"] = [self generateNSArrayCGRect:input.boundRects];
|
package/src/ios/RegulaConfig.m
CHANGED
|
@@ -550,6 +550,8 @@
|
|
|
550
550
|
customization.hologramAnimationPositionMultiplier = [[options valueForKey:@"hologramAnimationPositionMultiplier"] floatValue];
|
|
551
551
|
if([options valueForKey:@"hologramAnimationImage"] != nil)
|
|
552
552
|
customization.hologramAnimationImage = [self imageFromBase64:[options valueForKey:@"hologramAnimationImage"]];
|
|
553
|
+
if([options valueForKey:@"uiCustomizationLayer"] != nil)
|
|
554
|
+
customization.customUILayerJSON = [options valueForKey:@"uiCustomizationLayer"];
|
|
553
555
|
}
|
|
554
556
|
|
|
555
557
|
+(void)setFunctionality:(NSDictionary*)options :(RGLFunctionality*)functionality {
|
|
@@ -755,6 +757,7 @@
|
|
|
755
757
|
result[@"toolbarSize"] = [NSNumber numberWithFloat:customization.toolbarSize];
|
|
756
758
|
result[@"hologramAnimationImageContentMode"] = [NSNumber numberWithInteger:[self NSIntegerWithUIViewContentMode:customization.hologramAnimationImageContentMode]];
|
|
757
759
|
result[@"hologramAnimationPositionMultiplier"] = [NSNumber numberWithFloat:customization.hologramAnimationPositionMultiplier];
|
|
760
|
+
result[@"uiCustomizationLayer"] = customization.customUILayerJSON;
|
|
758
761
|
result[@"hologramAnimationImage"] = [UIImageJPEGRepresentation(customization.hologramAnimationImage, 1.0) base64EncodedStringWithOptions:0];
|
|
759
762
|
if(customization.customLabelStatus != nil)
|
|
760
763
|
result[@"customLabelStatus"] = customization.customLabelStatus.string;
|
package/www/DocumentReader.js
CHANGED
|
@@ -983,6 +983,26 @@ class DocumentReaderUvFiberElement {
|
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
985
|
|
|
986
|
+
class ImageInputData {
|
|
987
|
+
static fromJson(jsonObject) {
|
|
988
|
+
if (jsonObject == null) return null
|
|
989
|
+
const result = new ImageInputData()
|
|
990
|
+
|
|
991
|
+
result.pageIndex = jsonObject["pageIndex"]
|
|
992
|
+
result.light = jsonObject["light"]
|
|
993
|
+
result.type = jsonObject["type"]
|
|
994
|
+
result.width = jsonObject["width"]
|
|
995
|
+
result.height = jsonObject["height"]
|
|
996
|
+
result.bitmap = jsonObject["bitmap"]
|
|
997
|
+
result.imgBytes = []
|
|
998
|
+
if (jsonObject["imgBytes"] != null)
|
|
999
|
+
for (const i in jsonObject["imgBytes"])
|
|
1000
|
+
result.imgBytes.push(jsonObject["imgBytes"][i])
|
|
1001
|
+
|
|
1002
|
+
return result
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
|
|
986
1006
|
class DocumentReaderResults {
|
|
987
1007
|
getTextFieldValueByType({ fieldType, lcid = 0, source = -1, original = false }) {
|
|
988
1008
|
if (this.textResult == null) return null
|
|
@@ -1219,13 +1239,13 @@ const diDocType = {
|
|
|
1219
1239
|
dtIdentityCard: 12,
|
|
1220
1240
|
dtDiplomaticPassport: 13,
|
|
1221
1241
|
dtServicePassport: 14,
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1242
|
+
dtSeamanIdentityDocument: 15,
|
|
1243
|
+
dtIdentityCardForResidence: 16,
|
|
1244
|
+
dtTravelDocument: 17,
|
|
1225
1245
|
dtOther: 99,
|
|
1226
1246
|
dtVisaID2: 29,
|
|
1227
1247
|
dtVisaID3: 30,
|
|
1228
|
-
dtRegistrationCertificate:
|
|
1248
|
+
dtRegistrationCertificate: 206,
|
|
1229
1249
|
dtNationalIdentityCard: 20,
|
|
1230
1250
|
dtSocialIdentityCard: 21,
|
|
1231
1251
|
dtAliensIdentityCard: 22,
|
|
@@ -1242,10 +1262,10 @@ const diDocType = {
|
|
|
1242
1262
|
dtChauffeurLicenseUnder18: 36,
|
|
1243
1263
|
dtChauffeurLicenseUnder21: 37,
|
|
1244
1264
|
dtCommercialDrivingLicense: 38,
|
|
1245
|
-
|
|
1265
|
+
dtCommercialDrivingLicenseInstructionalPermit: 39,
|
|
1246
1266
|
dtCommercialDrivingLicenseUnder18: 40,
|
|
1247
1267
|
dtCommercialDrivingLicenseUnder21: 41,
|
|
1248
|
-
|
|
1268
|
+
dtCommercialInstructionPermit: 42,
|
|
1249
1269
|
dtCommercialNewPermit: 43,
|
|
1250
1270
|
dtConcealedCarryLicense: 44,
|
|
1251
1271
|
dtConcealedFirearmPermit: 45,
|
|
@@ -1253,9 +1273,9 @@ const diDocType = {
|
|
|
1253
1273
|
dtDepartmentOfVeteransAffairsIdentityCard: 47,
|
|
1254
1274
|
dtDiplomaticDrivingLicense: 48,
|
|
1255
1275
|
dtDrivingLicense: 49,
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1276
|
+
dtDrivingLicenseInstructionalPermit: 50,
|
|
1277
|
+
dtDrivingLicenseInstructionalPermitUnder18: 51,
|
|
1278
|
+
dtDrivingLicenseInstructionalPermitUnder21: 52,
|
|
1259
1279
|
dtDrivingLicenseLearnersPermit: 53,
|
|
1260
1280
|
dtDrivingLicenseLearnersPermitUnder18: 54,
|
|
1261
1281
|
dtDrivingLicenseLearnersPermitUnder21: 55,
|
|
@@ -1263,8 +1283,8 @@ const diDocType = {
|
|
|
1263
1283
|
dtDrivingLicenseNoviceUnder18: 57,
|
|
1264
1284
|
dtDrivingLicenseNoviceUnder21: 58,
|
|
1265
1285
|
dtDrivingLicenseRegisteredOffender: 59,
|
|
1266
|
-
|
|
1267
|
-
|
|
1286
|
+
dtDrivingLicenseRestrictedUnder18: 60,
|
|
1287
|
+
dtDrivingLicenseRestrictedUnder21: 61,
|
|
1268
1288
|
dtDrivingLicenseTemporaryVisitor: 62,
|
|
1269
1289
|
dtDrivingLicenseTemporaryVisitorUnder18: 63,
|
|
1270
1290
|
dtDrivingLicenseTemporaryVisitorUnder21: 64,
|
|
@@ -1289,8 +1309,8 @@ const diDocType = {
|
|
|
1289
1309
|
dtGenevaConventionsIdentityCard: 83,
|
|
1290
1310
|
dtGraduatedDrivingLicenseUnder18: 84,
|
|
1291
1311
|
dtGraduatedDrivingLicenseUnder21: 85,
|
|
1292
|
-
|
|
1293
|
-
|
|
1312
|
+
dtGraduatedInstructionPermitUnder18: 86,
|
|
1313
|
+
dtGraduatedInstructionPermitUnder21: 87,
|
|
1294
1314
|
dtGraduatedLicenseUnder18: 88,
|
|
1295
1315
|
dtGraduatedLicenseUnder21: 89,
|
|
1296
1316
|
dtHandgunCarryPermit: 90,
|
|
@@ -1304,16 +1324,16 @@ const diDocType = {
|
|
|
1304
1324
|
dtIdentityCardUnder21: 98,
|
|
1305
1325
|
dtIgnitionInterlockPermit: 100,
|
|
1306
1326
|
dtImmigrantVisa: 101,
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1327
|
+
dtInstructionPermit: 102,
|
|
1328
|
+
dtInstructionPermitUnder18: 103,
|
|
1329
|
+
dtInstructionPermitUnder21: 104,
|
|
1310
1330
|
dtInterimDrivingLicense: 105,
|
|
1311
1331
|
dtInterimIdentityCard: 106,
|
|
1312
1332
|
dtIntermediateDrivingLicense: 107,
|
|
1313
1333
|
dtIntermediateDrivingLicenseUnder18: 108,
|
|
1314
1334
|
dtIntermediateDrivingLicenseUnder21: 109,
|
|
1315
1335
|
dtJuniorDrivingLicense: 110,
|
|
1316
|
-
|
|
1336
|
+
dtLearnerInstructionalPermit: 111,
|
|
1317
1337
|
dtLearnerLicense: 112,
|
|
1318
1338
|
dtLearnerLicenseUnder18: 113,
|
|
1319
1339
|
dtLearnerLicenseUnder21: 114,
|
|
@@ -1350,9 +1370,9 @@ const diDocType = {
|
|
|
1350
1370
|
dtRacingAndGamingComissionCard: 145,
|
|
1351
1371
|
dtRefugeeTravelDocument: 146,
|
|
1352
1372
|
dtRenewalPermit: 147,
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1373
|
+
dtRestrictedCommercialDrivingLicense: 148,
|
|
1374
|
+
dtRestrictedDrivingLicense: 149,
|
|
1375
|
+
dtRestrictedPermit: 150,
|
|
1356
1376
|
dtSeasonalPermit: 151,
|
|
1357
1377
|
dtSeasonalResidentIdentityCard: 152,
|
|
1358
1378
|
dtSeniorCitizenIdentityCard: 153,
|
|
@@ -1362,9 +1382,9 @@ const diDocType = {
|
|
|
1362
1382
|
dtTemporaryDrivingLicenseUnder18: 157,
|
|
1363
1383
|
dtTemporaryDrivingLicenseUnder21: 158,
|
|
1364
1384
|
dtTemporaryIdentityCard: 159,
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1385
|
+
dtTemporaryInstructionPermitIdentityCard: 160,
|
|
1386
|
+
dtTemporaryInstructionPermitIdentityCardUnder18: 161,
|
|
1387
|
+
dtTemporaryInstructionPermitIdentityCardUnder21: 162,
|
|
1368
1388
|
dtTemporaryVisitorDrivingLicense: 163,
|
|
1369
1389
|
dtTemporaryVisitorDrivingLicenseUnder18: 164,
|
|
1370
1390
|
dtTemporaryVisitorDrivingLicenseUnder21: 165,
|
|
@@ -1387,15 +1407,15 @@ const diDocType = {
|
|
|
1387
1407
|
dtCertificateOfCitizenship: 182,
|
|
1388
1408
|
dtAddressCard: 183,
|
|
1389
1409
|
dtAirportImmigrationCard: 184,
|
|
1390
|
-
|
|
1410
|
+
dtAlienRegistrationCard: 185,
|
|
1391
1411
|
dtAPEHCard: 186,
|
|
1392
|
-
|
|
1412
|
+
dtCouponToDrivingLicense: 187,
|
|
1393
1413
|
dtCrewMemberCertificate: 188,
|
|
1394
1414
|
dtDocumentForReturn: 189,
|
|
1395
1415
|
dtECard: 190,
|
|
1396
1416
|
dtEmploymentCard: 191,
|
|
1397
1417
|
dtHKSARImmigrationForm: 192,
|
|
1398
|
-
|
|
1418
|
+
dtImmigrantCard: 193,
|
|
1399
1419
|
dtLabourCard: 194,
|
|
1400
1420
|
dtLaissezPasser: 195,
|
|
1401
1421
|
dtLawyerIdentityCertificate: 196,
|
|
@@ -1407,7 +1427,7 @@ const diDocType = {
|
|
|
1407
1427
|
dtPassportOfficial: 202,
|
|
1408
1428
|
dtPassportProvisional: 203,
|
|
1409
1429
|
dtPassportSpecial: 204,
|
|
1410
|
-
|
|
1430
|
+
dtPermissionToTheLocalBorderTraffic: 205,
|
|
1411
1431
|
dtSEDESOLCard: 207,
|
|
1412
1432
|
dtSocialCard: 208,
|
|
1413
1433
|
dtTBCard: 209,
|
|
@@ -1440,6 +1460,10 @@ const diDocType = {
|
|
|
1440
1460
|
dtInterimInstructionalPermit: 236,
|
|
1441
1461
|
dtCertificateOfCompetency: 237,
|
|
1442
1462
|
dtCertificateOfProficiency: 238,
|
|
1463
|
+
dtTradeLicense: 239,
|
|
1464
|
+
dtPassportPage: 240,
|
|
1465
|
+
dtInvoice: 241,
|
|
1466
|
+
dtPassengerLocatorForm: 242,
|
|
1443
1467
|
}
|
|
1444
1468
|
|
|
1445
1469
|
const DocFormat = {
|
|
@@ -1458,7 +1482,10 @@ const DocReaderAction = {
|
|
|
1458
1482
|
ERROR: 3,
|
|
1459
1483
|
NOTIFICATION: 5,
|
|
1460
1484
|
PROCESS_WHITE_UV_IMAGES: 6,
|
|
1485
|
+
PROCESS_WHITE_FLASHLIGHT: 7,
|
|
1461
1486
|
MORE_PAGES_AVAILABLE: 8,
|
|
1487
|
+
PROCESS_IR_FRAME: 9,
|
|
1488
|
+
TIMEOUT: 10,
|
|
1462
1489
|
}
|
|
1463
1490
|
|
|
1464
1491
|
const DocReaderFrame = {
|
|
@@ -3364,7 +3391,7 @@ const eRFID_ErrorCodes = {
|
|
|
3364
3391
|
case -2046820094:
|
|
3365
3392
|
return "LAYER6: ISO7816_B_03 \"Mutual authentication failure\""
|
|
3366
3393
|
case -2046820093:
|
|
3367
|
-
return "
|
|
3394
|
+
return "LAYER6: ISO7816_B_03 \"Mutual authentication failure data\""
|
|
3368
3395
|
case -2046819840:
|
|
3369
3396
|
return "LAYER6: SM failure – MAC missing"
|
|
3370
3397
|
case -2046819839:
|
|
@@ -3500,13 +3527,20 @@ const eRPRM_Lights = {
|
|
|
3500
3527
|
NONE: 0,
|
|
3501
3528
|
RPRM_LIGHT_UV: 128,
|
|
3502
3529
|
RPRM_LIGHT_WHITE_FULL: 6,
|
|
3530
|
+
RPRM_LIGHT_IR: 16777216,
|
|
3531
|
+
RPRM_Light_IR_TOP: 8,
|
|
3532
|
+
RPRM_Light_IR_SIDE: 16,
|
|
3533
|
+
RPRM_Light_IR_Full: 24,
|
|
3534
|
+
RPRM_LIGHT_OVD: 67108864,
|
|
3503
3535
|
|
|
3504
3536
|
getTranslation: function (value) {
|
|
3505
3537
|
switch (value) {
|
|
3506
|
-
case
|
|
3507
|
-
return "UV"
|
|
3508
|
-
case this.RPRM_LIGHT_WHITE_FULL:
|
|
3538
|
+
case 6:
|
|
3509
3539
|
return "Visible light"
|
|
3540
|
+
case 24:
|
|
3541
|
+
return "IR"
|
|
3542
|
+
case 128:
|
|
3543
|
+
return "UV"
|
|
3510
3544
|
default:
|
|
3511
3545
|
return value
|
|
3512
3546
|
}
|
|
@@ -4194,6 +4228,10 @@ const eVisualFieldType = {
|
|
|
4194
4228
|
FT_VACCINATION_CERTIFICATE_IDENTIFIER: 644,
|
|
4195
4229
|
FT_FIRST_NAME: 645,
|
|
4196
4230
|
FT_DATE_OF_ARRIVAL: 646,
|
|
4231
|
+
FT_SECOND_NAME: 647,
|
|
4232
|
+
FT_THIRD_NAME: 648,
|
|
4233
|
+
FT_FOURTH_NAME: 649,
|
|
4234
|
+
FT_LAST_NAME: 650,
|
|
4197
4235
|
|
|
4198
4236
|
getTranslation: function (value) {
|
|
4199
4237
|
switch (value) {
|
|
@@ -5388,7 +5426,15 @@ const eVisualFieldType = {
|
|
|
5388
5426
|
case 645:
|
|
5389
5427
|
return "First name"
|
|
5390
5428
|
case 646:
|
|
5391
|
-
return "
|
|
5429
|
+
return "Date of arrival"
|
|
5430
|
+
case 647:
|
|
5431
|
+
return "Second name"
|
|
5432
|
+
case 648:
|
|
5433
|
+
return "Third name"
|
|
5434
|
+
case 649:
|
|
5435
|
+
return "Fourth name"
|
|
5436
|
+
case 650:
|
|
5437
|
+
return "Last name"
|
|
5392
5438
|
default:
|
|
5393
5439
|
return value
|
|
5394
5440
|
}
|
|
@@ -6049,6 +6095,7 @@ DocumentReader.startNewPage = (successCallback, errorCallback) => cordova.exec(s
|
|
|
6049
6095
|
DocumentReader.startNewSession = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["startNewSession"])
|
|
6050
6096
|
DocumentReader.startRFIDReader = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["startRFIDReader"])
|
|
6051
6097
|
DocumentReader.stopRFIDReader = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["stopRFIDReader"])
|
|
6098
|
+
DocumentReader.stopRFIDReaderWithErrorMessage = (message, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["stopRFIDReaderWithErrorMessage", message])
|
|
6052
6099
|
DocumentReader.stopScanner = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["stopScanner"])
|
|
6053
6100
|
DocumentReader.deinitializeReader = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["deinitializeReader"])
|
|
6054
6101
|
DocumentReader.isAuthenticatorAvailableForUse = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["isAuthenticatorAvailableForUse"])
|
|
@@ -6084,12 +6131,11 @@ DocumentReader.provideTASignature = (certificates, successCallback, errorCallbac
|
|
|
6084
6131
|
DocumentReader.parseCoreResults = (json, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["parseCoreResults", json])
|
|
6085
6132
|
DocumentReader.setTCCParams = (params, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setTCCParams", params])
|
|
6086
6133
|
DocumentReader.initializeReaderWithDatabase = (license, db, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["initializeReaderWithDatabase", license, db])
|
|
6087
|
-
DocumentReader.recognizeImageFrame = (image, params, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognizeImageFrame", image, params])
|
|
6088
6134
|
DocumentReader.recognizeImageWithOpts = (image, options, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognizeImageWithOpts", image, options])
|
|
6089
6135
|
DocumentReader.recognizeVideoFrame = (byteString, params, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognizeVideoFrame", byteString, params])
|
|
6090
6136
|
DocumentReader.showScannerWithCameraIDAndOpts = (cameraID, options, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["showScannerWithCameraIDAndOpts", cameraID, options])
|
|
6091
|
-
DocumentReader.recognizeImageWithImageInputParams = (image, params, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognizeImageWithImageInputParams", image, params])
|
|
6092
6137
|
DocumentReader.recognizeImageWithCameraMode = (image, mode, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognizeImageWithCameraMode", image, mode])
|
|
6138
|
+
DocumentReader.recognizeImagesWithImageInputs = (images, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognizeImagesWithImageInputs", images])
|
|
6093
6139
|
|
|
6094
6140
|
DocumentReader.DocumentReaderResults = DocumentReaderResults
|
|
6095
6141
|
DocumentReader.Enum = Enum
|