@regulaforensics/cordova-plugin-document-reader-api 9.7.653-beta → 9.7.655-beta

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.
@@ -5,9 +5,6 @@
5
5
  <resource-file src="www/db.dat" target="app/src/main/assets/Regula/db.dat" />
6
6
  <preference name="orientation" value="portrait" />
7
7
  <preference name="AndroidEdgeToEdge" value="true" />
8
- <preference name="android-minSdkVersion" value="24" />
9
- <preference name="android-targetSdkVersion" value="36" />
10
- <preference name="GradlePluginKotlinEnabled" value="true" />
11
8
  <config-file parent="/*" target="AndroidManifest.xml">
12
9
  <uses-permission android:name="android.permission.NFC" />
13
10
  <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
@@ -13,11 +13,10 @@
13
13
  "author": "Regula Forensics Inc.",
14
14
  "license": "commercial",
15
15
  "dependencies": {
16
- "@regulaforensics/cordova-plugin-document-reader-api": "9.7.653-beta",
16
+ "@regulaforensics/cordova-plugin-document-reader-api": "9.7.655-beta",
17
17
  "@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "9.7.2829-beta",
18
- "cordova-android": "14.0.0",
18
+ "cordova-android": "15.0.0",
19
19
  "cordova-ios": "8.1.1",
20
- "cordova-plugin-advanced-http": "3.3.1",
21
20
  "cordova-plugin-camera": "8.0.0",
22
21
  "cordova-plugin-file": "8.1.3"
23
22
  },
@@ -26,8 +25,7 @@
26
25
  "@regulaforensics/cordova-plugin-document-reader-api": {},
27
26
  "@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": {},
28
27
  "cordova-plugin-file": {},
29
- "cordova-plugin-camera": {},
30
- "cordova-plugin-advanced-http": {}
28
+ "cordova-plugin-camera": {}
31
29
  },
32
30
  "platforms": [
33
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.7.653-beta",
3
+ "version": "9.7.655-beta",
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.7.653-beta" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="9.7.655-beta" 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>