@regulaforensics/cordova-plugin-document-reader-api 8.1.141-rc → 8.1.144-nightly
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/example/package.json +2 -2
- package/example/www/js/index.js +1 -1
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/src/android/Main.kt +7 -0
- package/src/android/build.gradle +2 -2
- package/src/ios/RGLWMain.m +10 -0
- package/www/DocumentReader.js +3 -2
package/example/package.json
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"author": "Regula Forensics Inc.",
|
|
14
14
|
"license": "commercial",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@regulaforensics/cordova-plugin-document-reader-api": "8.1.
|
|
17
|
-
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "8.1.
|
|
16
|
+
"@regulaforensics/cordova-plugin-document-reader-api": "8.1.144-nightly",
|
|
17
|
+
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "8.1.384-nightly",
|
|
18
18
|
"cordova-android": "13.0.0",
|
|
19
19
|
"cordova-ios": "7.1.1",
|
|
20
20
|
"cordova-plugin-add-swift-support": "2.0.2",
|
package/example/www/js/index.js
CHANGED
|
@@ -85,7 +85,7 @@ var app = {
|
|
|
85
85
|
function scan() {
|
|
86
86
|
var config = new ScannerConfig()
|
|
87
87
|
config.scenario = selectedScenario
|
|
88
|
-
DocumentReader.
|
|
88
|
+
DocumentReader.startScanner(config, function (m) {
|
|
89
89
|
handleCompletion(DocumentReaderCompletion.fromJson(JSON.parse(m)))
|
|
90
90
|
}, function (e) { })
|
|
91
91
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/cordova-plugin-document-reader-api",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.144-nightly",
|
|
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="@regulaforensics/cordova-plugin-document-reader-api" version="8.1.
|
|
2
|
+
<plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="8.1.144-nightly" xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
3
3
|
<name>DocumentReaderApi</name>
|
|
4
4
|
<description>Cordova plugin Document reader api</description>
|
|
5
5
|
<license>commercial</license>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<source url="https://github.com/CocoaPods/Specs.git"/>
|
|
30
30
|
</config>
|
|
31
31
|
<pods>
|
|
32
|
-
<pod name="
|
|
32
|
+
<pod name="DocumentReaderNightly" spec="8.1.4749" />
|
|
33
33
|
</pods>
|
|
34
34
|
</podspec>
|
|
35
35
|
</platform>
|
package/src/android/Main.kt
CHANGED
|
@@ -71,6 +71,7 @@ fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
|
|
|
71
71
|
"cancelDBUpdate" -> cancelDBUpdate(callback)
|
|
72
72
|
"checkDatabaseUpdate" -> checkDatabaseUpdate(callback, args(0))
|
|
73
73
|
"scan" -> scan(args(0))
|
|
74
|
+
"startScanner" -> startScanner(args(0))
|
|
74
75
|
"recognize" -> recognize(args(0))
|
|
75
76
|
"startNewPage" -> startNewPage()
|
|
76
77
|
"stopScanner" -> stopScanner()
|
|
@@ -196,11 +197,17 @@ fun checkDatabaseUpdate(callback: Callback, databaseID: String) = Instance().che
|
|
|
196
197
|
databaseID
|
|
197
198
|
) { callback(generateDocReaderDocumentsDatabase(it)) }
|
|
198
199
|
|
|
200
|
+
@Suppress("DEPRECATION")
|
|
199
201
|
fun scan(config: JSONObject) {
|
|
200
202
|
stopBackgroundRFID()
|
|
201
203
|
Instance().showScanner(context, scannerConfigFromJSON(config), IDocumentReaderCompletion(completion))
|
|
202
204
|
}
|
|
203
205
|
|
|
206
|
+
fun startScanner(config: JSONObject) {
|
|
207
|
+
stopBackgroundRFID()
|
|
208
|
+
Instance().startScanner(context, scannerConfigFromJSON(config), IDocumentReaderCompletion(completion))
|
|
209
|
+
}
|
|
210
|
+
|
|
204
211
|
fun recognize(config: JSONObject) {
|
|
205
212
|
stopBackgroundRFID()
|
|
206
213
|
Instance().recognize(recognizeConfigFromJSON(config), IDocumentReaderCompletion(completion))
|
package/src/android/build.gradle
CHANGED
|
@@ -8,13 +8,13 @@ android {
|
|
|
8
8
|
|
|
9
9
|
repositories {
|
|
10
10
|
maven {
|
|
11
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader/
|
|
11
|
+
url "https://maven.regulaforensics.com/RegulaDocumentReader/Nightly"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
dependencies {
|
|
16
16
|
//noinspection GradleDependency
|
|
17
|
-
implementation ('com.regula.documentreader:api:8.1.
|
|
17
|
+
implementation ('com.regula.documentreader:api:8.1.11532'){
|
|
18
18
|
transitive = true
|
|
19
19
|
}
|
|
20
20
|
}
|
package/src/ios/RGLWMain.m
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
@"cancelDBUpdate": ^{ [self cancelDBUpdate :callback]; },
|
|
35
35
|
@"checkDatabaseUpdate": ^{ [self checkDatabaseUpdate :args[0] :callback]; },
|
|
36
36
|
@"scan": ^{ [self scan :args[0]]; },
|
|
37
|
+
@"startScanner": ^{ [self startScanner :args[0]]; },
|
|
37
38
|
@"recognize": ^{ [self recognize :args[0]]; },
|
|
38
39
|
@"startNewPage": ^{ [self startNewPage]; },
|
|
39
40
|
@"stopScanner": ^{ [self stopScanner]; },
|
|
@@ -208,6 +209,15 @@ static NSDictionary* headers;
|
|
|
208
209
|
});
|
|
209
210
|
}
|
|
210
211
|
|
|
212
|
+
+(void)startScanner:(NSDictionary*)config {
|
|
213
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
214
|
+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
215
|
+
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
|
|
216
|
+
#pragma clang diagnostic pop
|
|
217
|
+
[RGLDocReader.shared startScannerFromPresenter:RGLWRootViewController() config:[RGLWJSONConstructor scannerConfigFromJson:config] completion:[self completion]];
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
211
221
|
+(void)recognize:(NSDictionary*)config {
|
|
212
222
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
213
223
|
[RGLDocReader.shared recognizeImageFromPresenter:RGLWRootViewController() config:[RGLWJSONConstructor recognizeConfigFromJson:config] completion:[self completion]];
|
package/www/DocumentReader.js
CHANGED
|
@@ -2201,8 +2201,8 @@ const eProcessGLCommands = {
|
|
|
2201
2201
|
}
|
|
2202
2202
|
|
|
2203
2203
|
const eRFIDReadingBufferSize = {
|
|
2204
|
-
|
|
2205
|
-
|
|
2204
|
+
STANDARD_LENGTH: 0,
|
|
2205
|
+
EXTENDED_LENGTH: -1,
|
|
2206
2206
|
}
|
|
2207
2207
|
|
|
2208
2208
|
const PKDResourceType = {
|
|
@@ -4371,6 +4371,7 @@ DocumentReader.runAutoUpdate = (databaseId, successCallback, errorCallback) => c
|
|
|
4371
4371
|
DocumentReader.cancelDBUpdate = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["cancelDBUpdate"])
|
|
4372
4372
|
DocumentReader.checkDatabaseUpdate = (databaseId, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["checkDatabaseUpdate", databaseId])
|
|
4373
4373
|
DocumentReader.scan = (config, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["scan", config])
|
|
4374
|
+
DocumentReader.startScanner = (config, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["startScanner", config])
|
|
4374
4375
|
DocumentReader.recognize = (config, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["recognize", config])
|
|
4375
4376
|
DocumentReader.startNewPage = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["startNewPage"])
|
|
4376
4377
|
DocumentReader.stopScanner = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["stopScanner"])
|