Skip to content

Commit 52c4927

Browse files
author
Jenkins
committed
5.4.0
1 parent 162b4ab commit 52c4927

13 files changed

Lines changed: 229 additions & 178 deletions

File tree

RNDocumentReaderApi.podspec

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

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies {
3939
//noinspection GradleDynamicVersion
4040
implementation 'com.facebook.react:react-native:+'
4141
//noinspection GradleDependency
42-
implementation('com.regula.documentreader:api:5.3.3597') {
42+
implementation('com.regula.documentreader:api:5.4.3934') {
4343
transitive = true
4444
}
4545
}

android/src/main/java/com/regula/documentreader/RNRegulaDocumentReaderModule.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.regula.documentreader.api.params.ImageInputParam;
2828
import com.regula.documentreader.api.params.rfid.PKDCertificate;
2929
import com.regula.documentreader.api.results.DocumentReaderResults;
30+
import com.regula.documentreader.api.errors.DocumentReaderException;
3031

3132
import org.json.JSONArray;
3233
import org.json.JSONException;
@@ -276,9 +277,6 @@ public void error(String s) {
276277
case "initializeReader":
277278
initializeReader(callback, args(0));
278279
break;
279-
case "initializeReaderWithDatabasePath":
280-
initializeReaderWithDatabasePath(callback, args(0), args(1));
281-
break;
282280
case "prepareDatabase":
283281
prepareDatabase(callback, args(0));
284282
break;
@@ -288,6 +286,9 @@ public void error(String s) {
288286
case "setRfidSessionStatus":
289287
setRfidSessionStatus(callback, args(0));
290288
break;
289+
case "initializeReaderWithDatabasePath":
290+
initializeReaderWithDatabasePath(callback, args(0), args(1));
291+
break;
291292
case "recognizeImageFrame":
292293
recognizeImageFrame(callback, args(0), args(1));
293294
break;
@@ -448,7 +449,7 @@ private void recognizeImageWithImageInputParams(@SuppressWarnings("unused") Call
448449
Instance().recognizeImage(JSONConstructor.bitmapFromBase64(base64Image), new ImageInputParam(params.getInt("width"), params.getInt("height"), params.getInt("type")), getCompletion());
449450
}
450451

451-
private void recognizeImageWithOpts(Callback callback, final JSONObject opts, String base64Image) throws JSONException {
452+
private void recognizeImageWithOpts(Callback callback, String base64Image, final JSONObject opts) throws JSONException {
452453
RegulaConfig.setConfig(Instance(), opts, getContext());
453454
recognizeImage(callback, base64Image);
454455
}
@@ -612,7 +613,7 @@ public void onPrepareProgressChanged(int progress) {
612613
}
613614

614615
@Override
615-
public void onPrepareCompleted(boolean status, Throwable error) {
616+
public void onPrepareCompleted(boolean status, DocumentReaderException error) {
616617
if (status)
617618
callback.success("database prepared");
618619
else
@@ -629,4 +630,4 @@ private IDocumentReaderInitCompletion getInitCompletion(Callback callback) {
629630
callback.error("Init failed:" + error);
630631
};
631632
}
632-
}
633+
}

android/src/main/java/com/regula/documentreader/RegulaConfig.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ private static void setFunctionality(Functionality functionality, JSONObject opt
9393
editor.setZoomEnabled(opts.getBoolean("isZoomEnabled"));
9494
if (opts.has("zoomFactor"))
9595
editor.setZoomFactor(BigDecimal.valueOf(opts.getDouble("zoomFactor")).floatValue());
96+
if (opts.has("isCameraTorchCheckDisabled"))
97+
editor.setIsCameraTorchCheckDisabled(opts.getBoolean("isCameraTorchCheckDisabled"));
9698

9799
editor.apply();
98100
}
@@ -306,6 +308,7 @@ private static JSONObject getFunctionality(Functionality functionality) throws J
306308
object.put("excludedCamera2Models", generateList(functionality.getExcludedCamera2Models()));
307309
object.put("isZoomEnabled", functionality.isZoomEnabled());
308310
object.put("zoomFactor", functionality.getZoomFactor());
311+
object.put("isCameraTorchCheckDisabled", functionality.isCameraTorchCheckDisabled());
309312

310313
return object;
311314
}

example/ios/DocumentReader.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@
444444
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
445445
GCC_WARN_UNUSED_FUNCTION = YES;
446446
GCC_WARN_UNUSED_VARIABLE = YES;
447-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
447+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
448448
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
449449
LIBRARY_SEARCH_PATHS = (
450450
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
@@ -497,7 +497,7 @@
497497
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
498498
GCC_WARN_UNUSED_FUNCTION = YES;
499499
GCC_WARN_UNUSED_VARIABLE = YES;
500-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
500+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
501501
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
502502
LIBRARY_SEARCH_PATHS = (
503503
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",

example/ios/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
platform :ios, '9.0'
1+
platform :ios, '10.0'
22
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
33

44
def add_flipper_pods!(versions = {})
@@ -69,7 +69,7 @@ target 'DocumentReader' do
6969
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
7070
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
7171
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
72-
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
72+
pod 'React-callinvoker', :path => "../node_modules/react-native/ReactCommon/callinvoker"
7373
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
7474
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
7575

example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"react-native": "0.63.4",
1616
"react-native-check-box": "^2.1.7",
1717
"react-native-customized-image-picker": "^1.1.0",
18-
"@regulaforensics/react-native-document-reader-api": "^5.3.0",
19-
"@regulaforensics/react-native-document-reader-core-fullrfid": "^5.3.0",
18+
"@regulaforensics/react-native-document-reader-api": "^5.4.0",
19+
"@regulaforensics/react-native-document-reader-core-fullrfid": "^5.4.0",
2020
"react-native-progress": "^4.1.2",
2121
"react-native-fs": "^2.16.6",
2222
"react-native-radio-buttons-group": "^1.0.7"

0 commit comments

Comments
 (0)