@regulaforensics/cordova-plugin-document-reader-api 9.6.644-rc → 9.6.656-rc

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.
@@ -1,38 +1,30 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
2
  <widget android-packageName="com.regula.dr.fullauthrfid" ios-CFBundleIdentifier="regula.DocumentReader" version="1.0.0" xmlns:android="http://schemas.android.com/apk/res/android" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
3
  <name>DocumentReader</name>
4
- <description>
5
- A sample Regula Document Reader application for reading and validation of identification documents.
6
- </description>
7
- <author email="cordova.support@regulaforensics.com" href="https://mobile.regulaforensics.com">
8
- Regula Forensics Inc.
9
- </author>
10
- <content src="index.html" />
11
- <access origin="*" />
12
- <allow-intent href="http://*/*" />
13
- <allow-intent href="https://*/*" />
14
- <allow-intent href="tel:*" />
15
- <allow-intent href="sms:*" />
16
- <allow-intent href="mailto:*" />
17
- <allow-intent href="geo:*" />
18
4
  <platform name="android">
19
5
  <resource-file src="www/db.dat" target="app/src/main/assets/Regula/db.dat" />
20
- <preference name="android-minSdkVersion" value="23" />
21
- <preference name="android-targetSdkVersion" value="34" />
22
- <allow-intent href="market:*" />
6
+ <preference name="orientation" value="portrait" />
7
+ <preference name="AndroidEdgeToEdge" value="true" />
23
8
  <config-file parent="/*" target="AndroidManifest.xml">
24
9
  <uses-permission android:name="android.permission.NFC" />
25
- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
26
10
  <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
27
- <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
28
11
  </config-file>
29
- <preference name="orientation" value="portrait" />
12
+ <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
13
+ <application android:usesCleartextTraffic="true" />
14
+ </edit-config>
30
15
  </platform>
31
16
  <platform name="ios">
32
17
  <resource-file src="www/db.dat" />
18
+ <preference name="deployment-target" value="14.0" />
19
+ <preference name="orientation" value="portrait" />
33
20
  <allow-intent href="itms:*" />
34
21
  <allow-intent href="itms-apps:*" />
35
- <preference name="orientation" value="portrait" />
22
+ <config-file parent="NSCameraUsageDescription" target="*-Info.plist">
23
+ <string>To use camera</string>
24
+ </config-file>
25
+ <config-file parent="NSPhotoLibraryUsageDescription" target="*-Info.plist">
26
+ <string>To pick images</string>
27
+ </config-file>
36
28
  <config-file target="*-Info.plist" parent="NSCameraUsageDescription">
37
29
  <string>To use camera</string>
38
30
  </config-file>
@@ -13,23 +13,19 @@
13
13
  "author": "Regula Forensics Inc.",
14
14
  "license": "commercial",
15
15
  "dependencies": {
16
- "@regulaforensics/cordova-plugin-document-reader-api": "9.6.644-rc",
17
- "@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "9.7.2796-rc",
18
- "cordova-android": "13.0.0",
19
- "cordova-ios": "7.1.1",
20
- "cordova-plugin-add-swift-support": "2.0.2",
21
- "cordova-plugin-advanced-http": "3.3.1",
22
- "cordova-plugin-camera": "7.0.0",
23
- "cordova-plugin-file": "8.0.0",
24
- "jetifier": "2.0.0"
16
+ "@regulaforensics/cordova-plugin-document-reader-api": "9.6.656-rc",
17
+ "@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "9.7.2814-rc",
18
+ "cordova-android": "15.0.0",
19
+ "cordova-ios": "8.1.1",
20
+ "cordova-plugin-camera": "8.0.0",
21
+ "cordova-plugin-file": "8.1.3"
25
22
  },
26
23
  "cordova": {
27
24
  "plugins": {
28
25
  "@regulaforensics/cordova-plugin-document-reader-api": {},
29
26
  "@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": {},
30
27
  "cordova-plugin-file": {},
31
- "cordova-plugin-camera": {},
32
- "cordova-plugin-advanced-http": {}
28
+ "cordova-plugin-camera": {}
33
29
  },
34
30
  "platforms": [
35
31
  "android",
@@ -2,8 +2,6 @@
2
2
  <html>
3
3
 
4
4
  <head>
5
- <meta http-equiv="Content-Security-Policy"
6
- content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content:;">
7
5
  <meta name="format-detection" content="telephone=no">
8
6
  <meta name="msapplication-tap-highlight" content="no">
9
7
  <meta name="viewport" content="initial-scale=1, width=device-width, viewport-fit=cover">
@@ -50,10 +48,6 @@
50
48
  <input id="rfidCheckbox" type="checkbox" name="rfid" disabled><span id="rfidCheckboxText"
51
49
  style="color: lightgrey"> Process rfid reading(unavailable)</span><br>
52
50
  </div>
53
- <div id="encryptionDiv" style="flex-direction: row; padding: 5px">
54
- <input id="encryptionCheckbox" type="checkbox" name="rfid" disabled><span id="encryptionCheckboxText"
55
- style="color: lightgrey"> Data encryption(unavailable)</span><br>
56
- </div>
57
51
  <div style="flex-direction: row; padding: 10px">
58
52
  <button id="showScannerButton" style="margin-right: 20px">scan doc</button>
59
53
  <button id="showImagePicker" style="margin-left: 20px">scan image</button>
@@ -16,7 +16,6 @@ var app = {
16
16
  this.receivedEvent('deviceready')
17
17
  document.getElementById("status").innerHTML = "loading......"
18
18
  document.getElementById("status").style.backgroundColor = "grey"
19
- var http = cordova.plugin.http
20
19
 
21
20
  // This way you can import any class declared in DocumentReaderPlugin
22
21
  var DocumentReader = DocumentReaderPlugin.DocumentReader
@@ -32,8 +31,6 @@ var app = {
32
31
 
33
32
  var selectedScenario = "Mrz"
34
33
  var doRfid = false
35
- var encryption = false
36
- const ENCRYPTED_RESULT_SERVICE = "https://api.regulaforensics.com/api/process"
37
34
  var isReadingRfidCustomUi = false
38
35
  var isReadingRfid = false
39
36
  var rfidUIHeader = "Reading RFID"
@@ -75,11 +72,6 @@ var app = {
75
72
  document.getElementById("rfidCheckboxText").onclick = function () { document.getElementById("rfidCheckbox").click() }
76
73
  document.getElementById("rfidCheckbox").onchange = function () { doRfid = this.checked }
77
74
  }
78
- document.getElementById("encryptionCheckbox").disabled = false
79
- document.getElementById("encryptionCheckboxText").style.color = "black"
80
- document.getElementById("encryptionCheckboxText").innerHTML = " Data encryption"
81
- document.getElementById("encryptionCheckboxText").onclick = function () { document.getElementById("encryptionCheckbox").click() }
82
- document.getElementById("encryptionCheckbox").onchange = function () { encryption = this.checked }
83
75
  }
84
76
 
85
77
  function scan() {
@@ -190,37 +182,10 @@ var app = {
190
182
  usualRFID()
191
183
  } else {
192
184
  isReadingRfid = false
193
- if (encryption) {
194
- var input = JSON.parse(results.rawResult)
195
- var processParam = {
196
- alreadyCropped: true,
197
- scenario: "FullProcess"
198
- }
199
- var body = {
200
- List: input["ContainerList"]["List"],
201
- processParam: processParam
202
- }
203
- postRequest(body)
204
- } else
205
- displayResults(results)
185
+ displayResults(results)
206
186
  }
207
187
  }
208
188
 
209
- function postRequest(body) {
210
- document.getElementById("status").innerHTML = "Getting results from server......"
211
- document.getElementById("status").style.backgroundColor = "grey"
212
- http.setDataSerializer('utf8')
213
- http.post(ENCRYPTED_RESULT_SERVICE, JSON.stringify(body), { "content-type": "application/json; utf-8" }, function (response) {
214
- DocumentReader.parseCoreResults(response.data, function (m) {
215
- displayResults(DocumentReaderResults.fromJson(JSON.parse(m)))
216
- }, function (e) { })
217
- }, function (response) {
218
- console.error(response.error)
219
- document.getElementById("status").innerHTML = "Something went wrong!"
220
- document.getElementById("status").style.backgroundColor = "red"
221
- })
222
- }
223
-
224
189
  function displayResults(results) {
225
190
  if (results == null) return
226
191
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/cordova-plugin-document-reader-api",
3
- "version": "9.6.644-rc",
3
+ "version": "9.6.656-rc",
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="9.6.644-rc" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="9.6.656-rc" 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/regulaforensics/podspecs.git"/>
30
30
  </config>
31
31
  <pods>
32
- <pod name="DocumentReaderStage" spec="9.7.6628" />
32
+ <pod name="DocumentReaderStage" spec="9.7.6640" />
33
33
  </pods>
34
34
  </podspec>
35
35
  </platform>
@@ -6,7 +6,7 @@ repositories {
6
6
 
7
7
  dependencies {
8
8
  //noinspection GradleDependency
9
- implementation ('com.regula.documentreader:api:9.6.13080'){
9
+ implementation ('com.regula.documentreader:api:9.6.13089'){
10
10
  transitive = true
11
11
  }
12
12
  }
@@ -1,23 +0,0 @@
1
- <!--
2
- #
3
- # Licensed to the Apache Software Foundation (ASF) under one
4
- # or more contributor license agreements. See the NOTICE file
5
- # distributed with this work for additional information
6
- # regarding copyright ownership. The ASF licenses this file
7
- # to you under the Apache License, Version 2.0 (the
8
- # "License"); you may not use this file except in compliance
9
- # with the License. You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing,
14
- # software distributed under the License is distributed on an
15
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- # KIND, either express or implied. See the License for the
17
- # specific language governing permissions and limitations
18
- # under the License.
19
- #
20
- -->
21
- # Cordova Hooks
22
-
23
- Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide.