@idpass/smartscanner-capacitor 0.5.0-beta.2 → 0.5.0-beta.3

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,3 +1,2 @@
1
1
  <manifest package="org.idpass.smartscanner.capacitor.smartscannercapacitorplugin">
2
2
  </manifest>
3
-
@@ -2,7 +2,12 @@ package org.idpass.smartscanner.capacitor
2
2
 
3
3
  import android.app.Activity
4
4
  import android.content.Intent
5
- import com.getcapacitor.*
5
+ import com.getcapacitor.JSObject;
6
+ import com.getcapacitor.Plugin;
7
+ import com.getcapacitor.PluginCall;
8
+ import com.getcapacitor.PluginMethod;
9
+ import com.getcapacitor.annotation.CapacitorPlugin;
10
+ import com.getcapacitor.annotation.Permission;
6
11
  import com.google.gson.Gson
7
12
  import org.idpass.smartscanner.lib.SmartScannerActivity
8
13
  import org.idpass.smartscanner.lib.scanner.config.ScannerOptions
@@ -10,7 +15,21 @@ import org.json.JSONException
10
15
  import org.json.JSONObject
11
16
  import timber.log.Timber
12
17
 
13
- @NativePlugin(requestCodes = [SmartScannerPlugin.REQUEST_OP_SCANNER])
18
+ @CapacitorPlugin(
19
+ name = "SmartScanner",
20
+ requestCodes = [SmartScannerPlugin.REQUEST_OP_SCANNER],
21
+ permissions = {
22
+ @Permission(
23
+ strings = { Manifest.permission.ACCESS_NETWORK_STATE },
24
+ alias = "network"
25
+ ),
26
+ @Permission(strings = { Manifest.permission.INTERNET }, alias = "internet"),
27
+ @Permission(
28
+ strings = { Manifest.permission.CAMERA },
29
+ alias = "camera"
30
+ )
31
+ }
32
+ )
14
33
  class SmartScannerPlugin : Plugin() {
15
34
 
16
35
  companion object {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idpass/smartscanner-capacitor",
3
- "version": "0.5.0-beta.2",
3
+ "version": "0.5.0-beta.3",
4
4
  "description": "Capacitor plugin for the SmartScanner Core library to scan MRZ, NFC and barcodes",
5
5
  "main": "dist/plugin.js",
6
6
  "module": "dist/esm/index.js",
File without changes