@regulaforensics/react-native-document-reader-api 6.5.0 → 6.7.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/RNDocumentReaderApi.podspec +1 -1
- package/android/build.gradle +4 -29
- package/android/src/main/AndroidManifest.xml +5 -1
- package/android/src/main/java/com/regula/documentreader/BluetoothUtil.kt +108 -0
- package/android/src/main/java/com/regula/documentreader/Helpers.java +4 -5
- package/android/src/main/java/com/regula/documentreader/JSONConstructor.java +150 -1345
- package/android/src/main/java/com/regula/documentreader/RNRegulaDocumentReaderModule.java +99 -12
- package/android/src/main/java/com/regula/documentreader/RegulaConfig.java +22 -1
- package/example/App.js +2 -0
- package/example/android/app/build.gradle +0 -6
- package/example/android/app/src/main/AndroidManifest.xml +2 -0
- package/example/android/build.gradle +5 -10
- package/example/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/example/ios/Podfile +8 -0
- package/example/metro.config.js +4 -1
- package/example/package.json +2 -2
- package/index.d.ts +165 -127
- package/index.js +113 -78
- package/ios/RGLWJSONConstructor.h +6 -0
- package/ios/RGLWJSONConstructor.m +102 -1
- package/ios/RNRegulaDocumentReader.m +77 -27
- package/ios/RegulaConfig.m +25 -1
- package/package.json +1 -1
- package/core/.gitkeep +0 -0
|
@@ -22,6 +22,7 @@ import com.facebook.react.bridge.ReactMethod;
|
|
|
22
22
|
import com.facebook.react.bridge.ReadableArray;
|
|
23
23
|
import com.facebook.react.bridge.WritableMap;
|
|
24
24
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
25
|
+
import com.regula.documentreader.api.completions.ICheckDatabaseUpdate;
|
|
25
26
|
import com.regula.documentreader.api.completions.IDocumentReaderCompletion;
|
|
26
27
|
import com.regula.documentreader.api.completions.IDocumentReaderInitCompletion;
|
|
27
28
|
import com.regula.documentreader.api.completions.IDocumentReaderPrepareCompletion;
|
|
@@ -32,6 +33,7 @@ import com.regula.documentreader.api.completions.ITccParamsCompletion;
|
|
|
32
33
|
import com.regula.documentreader.api.enums.DocReaderAction;
|
|
33
34
|
import com.regula.documentreader.api.errors.DocumentReaderException;
|
|
34
35
|
import com.regula.documentreader.api.internal.core.CoreScenarioUtil;
|
|
36
|
+
import com.regula.documentreader.api.params.BleDeviceConfig;
|
|
35
37
|
import com.regula.documentreader.api.params.DocReaderConfig;
|
|
36
38
|
import com.regula.documentreader.api.params.ImageInputData;
|
|
37
39
|
import com.regula.documentreader.api.internal.params.ImageInputParam;
|
|
@@ -55,15 +57,21 @@ import static com.regula.documentreader.api.DocumentReader.Instance;
|
|
|
55
57
|
|
|
56
58
|
import androidx.annotation.NonNull;
|
|
57
59
|
|
|
58
|
-
@SuppressWarnings({"ConstantConditions", "RedundantSuppression"})
|
|
60
|
+
@SuppressWarnings({"ConstantConditions", "RedundantSuppression", "MissingPermission"})
|
|
59
61
|
public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule implements ActivityEventListener, LifecycleEventListener {
|
|
60
62
|
private final static String prepareDatabaseProgressChangeEvent = "prepareDatabaseProgressChangeEvent";
|
|
61
63
|
private final static String completionEvent = "completionEvent";
|
|
62
64
|
private final static String videoEncoderCompletionEvent = "videoEncoderCompletionEvent";
|
|
63
65
|
private final static String rfidNotificationCompletionEvent = "rfidNotificationCompletionEvent";
|
|
66
|
+
|
|
64
67
|
private final static String paCertificateCompletionEvent = "paCertificateCompletionEvent";
|
|
65
68
|
private final static String taCertificateCompletionEvent = "taCertificateCompletionEvent";
|
|
66
69
|
private final static String taSignatureCompletionEvent = "taSignatureCompletionEvent";
|
|
70
|
+
|
|
71
|
+
private final static String bleOnServiceConnectedEvent = "bleOnServiceConnectedEvent";
|
|
72
|
+
private final static String bleOnServiceDisconnectedEvent = "bleOnServiceDisconnectedEvent";
|
|
73
|
+
private final static String bleOnDeviceReadyEvent = "bleOnDeviceReadyEvent";
|
|
74
|
+
|
|
67
75
|
private static int databaseDownloadProgress = 0;
|
|
68
76
|
JSONArray data;
|
|
69
77
|
private final ReactContext reactContext;
|
|
@@ -124,40 +132,51 @@ public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule imp
|
|
|
124
132
|
return (T) data.get(index);
|
|
125
133
|
}
|
|
126
134
|
|
|
127
|
-
|
|
135
|
+
static void send(ReactContext reactContext, String event, String data) {
|
|
128
136
|
WritableMap map = Arguments.createMap();
|
|
129
137
|
map.putString("msg", data);
|
|
130
138
|
reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(event, map);
|
|
131
139
|
}
|
|
132
140
|
|
|
133
141
|
private void sendProgress(int progress) {
|
|
134
|
-
send(prepareDatabaseProgressChangeEvent, progress + "");
|
|
142
|
+
send(reactContext, prepareDatabaseProgressChangeEvent, progress + "");
|
|
135
143
|
}
|
|
136
144
|
|
|
137
145
|
private void sendCompletion(int action, DocumentReaderResults results, DocumentReaderException error) {
|
|
138
|
-
send(completionEvent, JSONConstructor.generateCompletion(action, results, error, getContext()).toString());
|
|
146
|
+
send(reactContext, completionEvent, JSONConstructor.generateCompletion(action, results, error, getContext()).toString());
|
|
139
147
|
}
|
|
140
148
|
|
|
141
149
|
private void sendVideoEncoderCompletion(String sessionId, File file) {
|
|
142
|
-
send(videoEncoderCompletionEvent, JSONConstructor.generateVideoEncoderCompletion(sessionId, file).toString());
|
|
150
|
+
send(reactContext, videoEncoderCompletionEvent, JSONConstructor.generateVideoEncoderCompletion(sessionId, file).toString());
|
|
143
151
|
}
|
|
144
152
|
|
|
145
153
|
private void sendIRfidNotificationCompletion(int notification, Bundle value) {
|
|
146
|
-
send(rfidNotificationCompletionEvent, JSONConstructor.generateRfidNotificationCompletion(notification, value).toString());
|
|
154
|
+
send(reactContext, rfidNotificationCompletionEvent, JSONConstructor.generateRfidNotificationCompletion(notification, value).toString());
|
|
147
155
|
}
|
|
148
156
|
|
|
149
157
|
private void sendPACertificateCompletion(byte[] serialNumber, PAResourcesIssuer issuer) {
|
|
150
|
-
send(paCertificateCompletionEvent, JSONConstructor.generatePACertificateCompletion(serialNumber, issuer).toString());
|
|
158
|
+
send(reactContext, paCertificateCompletionEvent, JSONConstructor.generatePACertificateCompletion(serialNumber, issuer).toString());
|
|
151
159
|
}
|
|
152
160
|
|
|
153
161
|
private void sendTACertificateCompletion(String keyCAR) {
|
|
154
|
-
send(taCertificateCompletionEvent, keyCAR);
|
|
162
|
+
send(reactContext, taCertificateCompletionEvent, keyCAR);
|
|
155
163
|
}
|
|
156
164
|
|
|
157
165
|
private void sendTASignatureCompletion(TAChallenge challenge) {
|
|
158
|
-
send(taSignatureCompletionEvent, JSONConstructor.generateTAChallenge(challenge).toString());
|
|
166
|
+
send(reactContext, taSignatureCompletionEvent, JSONConstructor.generateTAChallenge(challenge).toString());
|
|
159
167
|
}
|
|
160
168
|
|
|
169
|
+
private void sendBleOnServiceConnectedEvent(boolean isBleManagerConnected) {
|
|
170
|
+
send(reactContext, bleOnServiceConnectedEvent, isBleManagerConnected +"");
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
private void sendBleOnServiceDisconnectedEvent() {
|
|
174
|
+
send(reactContext, bleOnServiceDisconnectedEvent, "");
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
private void sendBleOnDeviceReadyEvent() {
|
|
178
|
+
send(reactContext, bleOnDeviceReadyEvent, "");
|
|
179
|
+
}
|
|
161
180
|
|
|
162
181
|
private interface Callback {
|
|
163
182
|
void success(Object o);
|
|
@@ -194,6 +213,18 @@ public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule imp
|
|
|
194
213
|
case "initializeReaderAutomatically":
|
|
195
214
|
initializeReaderAutomatically(callback);
|
|
196
215
|
break;
|
|
216
|
+
case "isBlePermissionsGranted":
|
|
217
|
+
isBlePermissionsGranted(callback);
|
|
218
|
+
break;
|
|
219
|
+
case "startBluetoothService":
|
|
220
|
+
startBluetoothService(callback);
|
|
221
|
+
break;
|
|
222
|
+
case "initializeReaderBleDeviceConfig":
|
|
223
|
+
initializeReaderBleDeviceConfig(callback);
|
|
224
|
+
break;
|
|
225
|
+
case "getTag":
|
|
226
|
+
getTag(callback);
|
|
227
|
+
break;
|
|
197
228
|
case "getAPIVersion":
|
|
198
229
|
getAPIVersion(callback);
|
|
199
230
|
break;
|
|
@@ -314,6 +345,12 @@ public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule imp
|
|
|
314
345
|
case "setCameraSessionIsPaused":
|
|
315
346
|
setCameraSessionIsPaused(callback, args(0));
|
|
316
347
|
break;
|
|
348
|
+
case "setTag":
|
|
349
|
+
setTag(callback, args(0));
|
|
350
|
+
break;
|
|
351
|
+
case "checkDatabaseUpdate":
|
|
352
|
+
checkDatabaseUpdate(callback, args(0));
|
|
353
|
+
break;
|
|
317
354
|
case "getScenario":
|
|
318
355
|
getScenario(callback, args(0));
|
|
319
356
|
break;
|
|
@@ -378,7 +415,8 @@ public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule imp
|
|
|
378
415
|
recognizeImagesWithImageInputs(callback, args(0));
|
|
379
416
|
break;
|
|
380
417
|
}
|
|
381
|
-
} catch (Exception
|
|
418
|
+
} catch (Exception e) {
|
|
419
|
+
e.printStackTrace();
|
|
382
420
|
}
|
|
383
421
|
}
|
|
384
422
|
|
|
@@ -421,6 +459,37 @@ public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule imp
|
|
|
421
459
|
callback.success("already initialized");
|
|
422
460
|
}
|
|
423
461
|
|
|
462
|
+
private void isBlePermissionsGranted(Callback callback) {
|
|
463
|
+
callback.success(BluetoothUtil.Companion.isBlePermissionsGranted(getActivity()));
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
private void startBluetoothService(Callback callback) {
|
|
467
|
+
BluetoothUtil.Companion.startBluetoothService(
|
|
468
|
+
getActivity(),
|
|
469
|
+
isBleManagerConnected -> {
|
|
470
|
+
sendBleOnServiceConnectedEvent(isBleManagerConnected);
|
|
471
|
+
return null;
|
|
472
|
+
},
|
|
473
|
+
() -> {
|
|
474
|
+
sendBleOnServiceDisconnectedEvent();
|
|
475
|
+
return null;
|
|
476
|
+
},
|
|
477
|
+
() -> {
|
|
478
|
+
sendBleOnDeviceReadyEvent();
|
|
479
|
+
return null;
|
|
480
|
+
}
|
|
481
|
+
);
|
|
482
|
+
callback.success();
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
private void initializeReaderBleDeviceConfig(Callback callback) {
|
|
486
|
+
if (BluetoothUtil.Companion.getBleManager() == null) callback.error("bleManager is null");
|
|
487
|
+
if (!Instance().isReady())
|
|
488
|
+
Instance().initializeReader(getContext(), new BleDeviceConfig(BluetoothUtil.Companion.getBleManager()), getInitCompletion(callback));
|
|
489
|
+
else
|
|
490
|
+
callback.success("already initialized");
|
|
491
|
+
}
|
|
492
|
+
|
|
424
493
|
private void getAvailableScenarios(Callback callback) throws JSONException {
|
|
425
494
|
callback.success(JSONConstructor.generateList(Instance().availableScenarios, JSONConstructor::generateDocumentReaderScenario).toString());
|
|
426
495
|
}
|
|
@@ -537,6 +606,20 @@ public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule imp
|
|
|
537
606
|
callback.success();
|
|
538
607
|
}
|
|
539
608
|
|
|
609
|
+
private void getTag(Callback callback) {
|
|
610
|
+
callback.success(Instance().tag);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
private void setTag(Callback callback, String tag) {
|
|
614
|
+
Instance().tag = tag;
|
|
615
|
+
callback.success();
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
private void checkDatabaseUpdate(Callback callback, String databaseId) {
|
|
619
|
+
Instance().checkDatabaseUpdate(getContext(), databaseId, getCheckDatabaseUpdateCompletion(callback));
|
|
620
|
+
callback.success();
|
|
621
|
+
}
|
|
622
|
+
|
|
540
623
|
private void startNewPage(Callback callback) {
|
|
541
624
|
Instance().startNewPage();
|
|
542
625
|
callback.success();
|
|
@@ -578,7 +661,7 @@ public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule imp
|
|
|
578
661
|
}
|
|
579
662
|
|
|
580
663
|
private void cancelDBUpdate(Callback callback) {
|
|
581
|
-
callback.success(Instance().cancelDBUpdate());
|
|
664
|
+
callback.success(Instance().cancelDBUpdate(getContext()));
|
|
582
665
|
}
|
|
583
666
|
|
|
584
667
|
private void resetConfiguration(Callback callback) {
|
|
@@ -724,7 +807,7 @@ public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule imp
|
|
|
724
807
|
callback.error("getCameraSessionIsPaused() is an ios-only method");
|
|
725
808
|
}
|
|
726
809
|
|
|
727
|
-
private void stopRFIDReaderWithErrorMessage(Callback callback, String message) {
|
|
810
|
+
private void stopRFIDReaderWithErrorMessage(Callback callback, @SuppressWarnings("unused") String message) {
|
|
728
811
|
callback.error("stopRFIDReaderWithErrorMessage() is an ios-only method");
|
|
729
812
|
}
|
|
730
813
|
|
|
@@ -780,6 +863,10 @@ public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule imp
|
|
|
780
863
|
};
|
|
781
864
|
}
|
|
782
865
|
|
|
866
|
+
private ICheckDatabaseUpdate getCheckDatabaseUpdateCompletion(Callback callback) {
|
|
867
|
+
return (database) -> callback.success(JSONConstructor.generateDocReaderDocumentsDatabase(database));
|
|
868
|
+
}
|
|
869
|
+
|
|
783
870
|
private ITccParamsCompletion getTCCParamsCompletion(Callback callback) {
|
|
784
871
|
return (success, error) -> {
|
|
785
872
|
if (success)
|
|
@@ -13,6 +13,7 @@ import com.regula.documentreader.api.params.ProcessParam;
|
|
|
13
13
|
import com.regula.documentreader.api.params.rfid.ReprocParams;
|
|
14
14
|
import com.regula.documentreader.api.params.rfid.dg.DataGroups;
|
|
15
15
|
|
|
16
|
+
import android.annotation.SuppressLint;
|
|
16
17
|
import android.content.Context;
|
|
17
18
|
import android.graphics.Paint;
|
|
18
19
|
import android.text.SpannableString;
|
|
@@ -43,6 +44,7 @@ class RegulaConfig {
|
|
|
43
44
|
return object;
|
|
44
45
|
}
|
|
45
46
|
|
|
47
|
+
@SuppressLint("MissingPermission")
|
|
46
48
|
private static void setFunctionality(Functionality functionality, JSONObject opts) throws JSONException {
|
|
47
49
|
Functionality.FunctionalityEditor editor = functionality.edit();
|
|
48
50
|
if (opts.has("pictureOnBoundsReady"))
|
|
@@ -213,6 +215,18 @@ class RegulaConfig {
|
|
|
213
215
|
processParams.parseBarcodes = opts.getBoolean("parseBarcodes");
|
|
214
216
|
if (opts.has("shouldReturnPackageForReprocess"))
|
|
215
217
|
processParams.shouldReturnPackageForReprocess = opts.getBoolean("shouldReturnPackageForReprocess");
|
|
218
|
+
if (opts.has("imageOutputMaxHeight"))
|
|
219
|
+
processParams.imageOutputMaxHeight = opts.getInt("imageOutputMaxHeight");
|
|
220
|
+
if (opts.has("imageOutputMaxWidth"))
|
|
221
|
+
processParams.imageOutputMaxWidth = opts.getInt("imageOutputMaxWidth");
|
|
222
|
+
if (opts.has("disablePerforationOCR"))
|
|
223
|
+
processParams.disablePerforationOCR = opts.getBoolean("disablePerforationOCR");
|
|
224
|
+
if (opts.has("documentGroupFilter"))
|
|
225
|
+
processParams.documentGroupFilter = intArrayFromJson(opts.getJSONArray("documentGroupFilter"));
|
|
226
|
+
if (opts.has("respectImageQuality"))
|
|
227
|
+
processParams.respectImageQuality = opts.getBoolean("respectImageQuality");
|
|
228
|
+
if (opts.has("splitNames"))
|
|
229
|
+
processParams.splitNames = opts.getBoolean("splitNames");
|
|
216
230
|
}
|
|
217
231
|
|
|
218
232
|
private static void setCustomization(ParamsCustomization customization, JSONObject opts, Context context) throws JSONException {
|
|
@@ -485,7 +499,7 @@ class RegulaConfig {
|
|
|
485
499
|
object.put("matchTextFieldMask", processParams.matchTextFieldMask);
|
|
486
500
|
object.put("fastDocDetect", processParams.fastDocDetect);
|
|
487
501
|
object.put("updateOCRValidityByGlare", processParams.updateOCRValidityByGlare);
|
|
488
|
-
object.put("imageQA", processParams.imageQA
|
|
502
|
+
object.put("imageQA", processParams.imageQA.toJsonObject());
|
|
489
503
|
object.put("forceDocFormat", processParams.forceDocFormat);
|
|
490
504
|
object.put("noGraphics", processParams.noGraphics);
|
|
491
505
|
object.put("documentAreaMin", processParams.documentAreaMin);
|
|
@@ -496,6 +510,12 @@ class RegulaConfig {
|
|
|
496
510
|
object.put("forceReadMrzBeforeLocate", processParams.forceReadMrzBeforeLocate);
|
|
497
511
|
object.put("parseBarcodes", processParams.parseBarcodes);
|
|
498
512
|
object.put("shouldReturnPackageForReprocess", processParams.shouldReturnPackageForReprocess);
|
|
513
|
+
object.put("imageOutputMaxHeight", processParams.imageOutputMaxHeight);
|
|
514
|
+
object.put("imageOutputMaxWidth", processParams.imageOutputMaxWidth);
|
|
515
|
+
object.put("disablePerforationOCR", processParams.disablePerforationOCR);
|
|
516
|
+
object.put("documentGroupFilter", generateIntArray(processParams.documentGroupFilter));
|
|
517
|
+
object.put("respectImageQuality", processParams.respectImageQuality);
|
|
518
|
+
object.put("splitNames", processParams.splitNames);
|
|
499
519
|
|
|
500
520
|
return object;
|
|
501
521
|
}
|
|
@@ -684,6 +704,7 @@ class RegulaConfig {
|
|
|
684
704
|
setProcessParams(params, input.getJSONObject("processParams"));
|
|
685
705
|
builder.setProcessParams(params);
|
|
686
706
|
}
|
|
707
|
+
return builder.build();
|
|
687
708
|
} catch (JSONException e) {
|
|
688
709
|
e.printStackTrace();
|
|
689
710
|
}
|
package/example/App.js
CHANGED
|
@@ -170,6 +170,7 @@ export default class App extends Component {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
displayResults(results) {
|
|
173
|
+
if(results == null) return
|
|
173
174
|
this.setState({ fullName: results.getTextFieldValueByType({ fieldType: Enum.eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES }) })
|
|
174
175
|
if (results.getGraphicFieldImageByType({ fieldType: Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE }) != null)
|
|
175
176
|
this.setState({ docFront: { uri: "data:image/png;base64," + results.getGraphicFieldImageByType({ fieldType: Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE }) } })
|
|
@@ -210,6 +211,7 @@ export default class App extends Component {
|
|
|
210
211
|
</View>
|
|
211
212
|
}
|
|
212
213
|
{!this.state.isReadingRfidCustomUi && <View style={styles.container}>
|
|
214
|
+
<Text/><Text/>
|
|
213
215
|
<Text style={{
|
|
214
216
|
top: 1,
|
|
215
217
|
left: 1,
|
|
@@ -15,14 +15,8 @@ def enableHermes = project.ext.react.get("enableHermes", false);
|
|
|
15
15
|
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")
|
|
16
16
|
|
|
17
17
|
android {
|
|
18
|
-
ndkVersion rootProject.ext.ndkVersion
|
|
19
|
-
|
|
20
18
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
21
19
|
|
|
22
|
-
compileOptions {
|
|
23
|
-
sourceCompatibility JavaVersion.VERSION_1_8
|
|
24
|
-
targetCompatibility JavaVersion.VERSION_1_8
|
|
25
|
-
}
|
|
26
20
|
defaultConfig {
|
|
27
21
|
applicationId "com.regula.dr.fullrfid"
|
|
28
22
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
2
|
package="com.regula.dr.fullrfid">
|
|
3
3
|
|
|
4
|
+
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
|
5
|
+
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
|
|
4
6
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
5
7
|
<uses-permission android:name="android.permission.NFC" />
|
|
6
8
|
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
2
|
-
|
|
3
1
|
buildscript {
|
|
4
2
|
ext {
|
|
5
|
-
buildToolsVersion = "
|
|
3
|
+
buildToolsVersion = "33.0.0"
|
|
6
4
|
minSdkVersion = 21
|
|
7
|
-
compileSdkVersion =
|
|
8
|
-
targetSdkVersion =
|
|
9
|
-
ndkVersion = "21.4.7075529"
|
|
5
|
+
compileSdkVersion = 33
|
|
6
|
+
targetSdkVersion = 33
|
|
10
7
|
}
|
|
11
8
|
repositories {
|
|
12
9
|
google()
|
|
13
10
|
mavenCentral()
|
|
14
11
|
}
|
|
15
12
|
dependencies {
|
|
16
|
-
classpath(
|
|
13
|
+
classpath('com.android.tools.build:gradle:7.2.2')
|
|
14
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
17
|
|
|
@@ -21,13 +19,10 @@ allprojects {
|
|
|
21
19
|
repositories {
|
|
22
20
|
mavenCentral()
|
|
23
21
|
mavenLocal()
|
|
24
|
-
|
|
25
22
|
maven {
|
|
26
|
-
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
27
23
|
url("$rootDir/../node_modules/react-native/android")
|
|
28
24
|
}
|
|
29
25
|
maven {
|
|
30
|
-
// Android JSC is installed from npm
|
|
31
26
|
url("$rootDir/../node_modules/jsc-android/dist")
|
|
32
27
|
}
|
|
33
28
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
|
|
4
4
|
zipStoreBase=GRADLE_USER_HOME
|
|
5
5
|
zipStorePath=wrapper/dists
|
package/example/ios/Podfile
CHANGED
|
@@ -20,5 +20,13 @@ target 'DocumentReader' do
|
|
|
20
20
|
post_install do |installer|
|
|
21
21
|
react_native_post_install(installer)
|
|
22
22
|
__apply_Xcode_12_5_M1_post_install_workaround(installer)
|
|
23
|
+
|
|
24
|
+
installer.pods_project.targets.each do |target|
|
|
25
|
+
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
|
|
26
|
+
target.build_configurations.each do |config|
|
|
27
|
+
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
23
31
|
end
|
|
24
32
|
end
|
package/example/metro.config.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
|
-
const folders = [
|
|
2
|
+
const folders = [
|
|
3
|
+
"../",
|
|
4
|
+
path.resolve(path.join(__dirname, './node_modules'))
|
|
5
|
+
];
|
|
3
6
|
module.exports = {
|
|
4
7
|
transformer: {
|
|
5
8
|
getTransformOptions: async () => ({
|
package/example/package.json
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"lint": "eslint ."
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@regulaforensics/react-native-document-reader-api": "6.
|
|
14
|
-
"@regulaforensics/react-native-document-reader-core-fullrfid": "6.
|
|
13
|
+
"@regulaforensics/react-native-document-reader-api": "6.7.0",
|
|
14
|
+
"@regulaforensics/react-native-document-reader-core-fullrfid": "6.7.0",
|
|
15
15
|
"react": "17.0.2",
|
|
16
16
|
"react-native": "^0.67.0",
|
|
17
17
|
"react-native-check-box": "^2.1.7",
|