@regulaforensics/ionic-native-document-reader 5.5.1 → 6.1.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/README.md CHANGED
@@ -41,7 +41,7 @@ If you have issues with license verification when running the application, pleas
41
41
  6. You placed the `license` into the correct folder as described [here](#how-to-build-demo-application).
42
42
 
43
43
  ## Documentation
44
- You can find documentation on API [here](https://docs.regulaforensics.com/ionic).
44
+ You can find documentation on API [here](https://docs.regulaforensics.com/develop/doc-reader-sdk/mobile/ionic).
45
45
 
46
46
  ## Additional information
47
47
  If you have any technical questions, feel free to [contact](mailto:dev.support@regulaforensics.com) us or create issue [here](https://github.com/regulaforensics/DocumentReader-Ionic-Plugin/issues).
@@ -30,9 +30,9 @@
30
30
  "cordova-ios": "^6.1.1",
31
31
  "cordova-plugin-add-swift-support": "^2.0.2",
32
32
  "cordova-plugin-android-permissions": "^1.1.0",
33
- "@regulaforensics/cordova-plugin-document-reader-api": "^5.5.0",
34
- "@regulaforensics/cordova-plugin-document-reader-core-fullrfid": "^5.5.0",
35
- "@regulaforensics/ionic-native-document-reader": "^5.5.1",
33
+ "@regulaforensics/cordova-plugin-document-reader-api": "^6.1.0",
34
+ "@regulaforensics/cordova-plugin-document-reader-core-fullrfid": "^6.1.0",
35
+ "@regulaforensics/ionic-native-document-reader": "^6.1.0",
36
36
  "cordova-plugin-file": "^6.0.2",
37
37
  "cordova-plugin-telerik-imagepicker": "^2.3.5",
38
38
  "core-js": "^3.6.5",
@@ -124,7 +124,7 @@ export class HomePage {
124
124
  if (isReadingRfid && completion.action === Enum.DocReaderAction.NOTIFICATION)
125
125
  updateRfidUI(completion.results.documentReaderNotification)
126
126
  if (completion.action === Enum.DocReaderAction.COMPLETE)
127
- if (isReadingRfid){
127
+ if (isReadingRfid) {
128
128
  if (completion.results.rfidResult !== 1)
129
129
  restartRfidUI()
130
130
  else {
@@ -179,8 +179,26 @@ export class HomePage {
179
179
  function usualRFID() {
180
180
  doRfid = false
181
181
  app.rfidCheckbox["el"].checked = false
182
- DocumentReader.startRFIDReader().subscribe(m =>
183
- handleCompletion(DocumentReaderCompletion.fromJson(JSON.parse(m))))
182
+ var notification = "rfidNotificationCompletionEvent"
183
+ var paCert = "paCertificateCompletionEvent"
184
+ var taCert = "taCertificateCompletionEvent"
185
+ var taSig = "taSignatureCompletionEvent"
186
+ DocumentReader.startRFIDReader().subscribe(m => {
187
+ if (m.substring(0, notification.length) === notification) {
188
+ m = m.substring(notification.length, m.length)
189
+ console.log(notification + ": " + m)
190
+ } else if (m.substring(0, paCert.length) === paCert) {
191
+ m = m.substring(paCert.length, m.length)
192
+ console.log(paCert + ": " + m)
193
+ } else if (m.substring(0, taCert.length) === taCert) {
194
+ m = m.substring(taCert.length, m.length)
195
+ console.log(taCert + ": " + m)
196
+ } else if (m.substring(0, taSig.length) === taSig) {
197
+ m = m.substring(taSig.length, m.length)
198
+ console.log(taSig + ": " + m)
199
+ } else
200
+ handleCompletion(DocumentReaderCompletion.fromJson(JSON.parse(m)))
201
+ })
184
202
  }
185
203
 
186
204
  function onInitialized() {
@@ -208,6 +226,7 @@ export class HomePage {
208
226
  DocumentReader.getAvailableScenarios().then(sc =>
209
227
  DocumentReader.isRFIDAvailableForUse().then(canRfid =>
210
228
  postInitialize(JSON.parse(sc), canRfid)))
229
+ DocumentReader.setRfidDelegate(Enum.RFIDDelegate.NO_PA)
211
230
  // addCertificates()
212
231
  }
213
232