scandit-capacitor-datacapture-barcode 6.23.0-beta.2 → 6.24.0-beta.1

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.
@@ -17,5 +17,5 @@ Pod::Spec.new do |s|
17
17
 
18
18
  s.dependency "Capacitor"
19
19
  s.dependency "ScanditCapacitorDatacaptureCore", "= #{version}"
20
- s.dependency "scandit-datacapture-frameworks-barcode", '= 6.23.0-beta.2'
20
+ s.dependency "scandit-datacapture-frameworks-barcode", '= 6.24.0-beta.1'
21
21
  end
@@ -11,7 +11,7 @@ def safeExtGet(prop, fallback) {
11
11
  buildscript {
12
12
  ext {
13
13
  kotlin_version = "1.8.20"
14
- agp_version = "8.0.1"
14
+ agp_version = "8.1.0"
15
15
  }
16
16
  repositories {
17
17
  google()
@@ -56,7 +56,7 @@ repositories {
56
56
  }
57
57
 
58
58
  dependencies {
59
- def sdk_version = "6.23.0-beta.2"
59
+ def sdk_version = "6.24.0-beta.1"
60
60
 
61
61
  implementation fileTree(dir: 'libs', include: ['*.jar'])
62
62
  implementation fileTree(dir: 'library', include: ['*.aar'])
@@ -71,7 +71,6 @@ import org.json.JSONObject
71
71
  )
72
72
  class ScanditBarcodeNative :
73
73
  Plugin(),
74
- DeserializationLifecycleObserver.Observer,
75
74
  Emitter {
76
75
 
77
76
  companion object {
@@ -138,8 +137,6 @@ class ScanditBarcodeNative :
138
137
  barcodeFindViewHandler.attachWebView(bridge.webView)
139
138
  barcodePickViewHandler.attachWebView(bridge.webView, bridge.activity)
140
139
  }
141
- DeserializationLifecycleObserver.attach(this)
142
-
143
140
  barcodeModule.onCreate(context)
144
141
  barcodeCaptureModule.onCreate(context)
145
142
  barcodeTrackingModule.onCreate(context)
@@ -164,11 +161,13 @@ class ScanditBarcodeNative :
164
161
  override fun handleOnPause() {
165
162
  super.handleOnPause()
166
163
  barcodeFindModule.viewOnPause(CapacitorNoopResult())
164
+ barcodePickModule.viewOnPause()
167
165
  }
168
166
 
169
167
  override fun handleOnResume() {
170
168
  super.handleOnResume()
171
169
  barcodeFindModule.viewOnResume(CapacitorNoopResult())
170
+ barcodePickModule.viewOnResume()
172
171
  }
173
172
 
174
173
  @PluginMethod
@@ -700,6 +699,11 @@ class ScanditBarcodeNative :
700
699
 
701
700
  @PluginMethod
702
701
  fun setBarcodeCountCaptureList(call: PluginCall) {
702
+ if (!call.data.has("TargetBarcodes") || call.data.getJSONArray("TargetBarcodes").length() == 0) {
703
+ call.reject("No data provided")
704
+ return
705
+ }
706
+
703
707
  val barcodes = call.data.getJSONArray("TargetBarcodes")
704
708
  barcodeCountModule.setBarcodeCountCaptureList(barcodes)
705
709
  call.resolve()
@@ -952,6 +956,17 @@ class ScanditBarcodeNative :
952
956
  call.resolve()
953
957
  }
954
958
 
959
+ @PluginMethod
960
+ fun setBarcodeTransformer(call: PluginCall) {
961
+ barcodeFindModule.setBarcodeFindTransformer(CapacitorResult(call))
962
+ }
963
+
964
+ @PluginMethod
965
+ fun submitBarcodeFindTransformerResult(call: PluginCall) {
966
+ val transformedBarcode = call.data.optString("transformedBarcode", null)
967
+ barcodeFindModule.submitBarcodeFindTransformerResult(transformedBarcode, CapacitorResult(call))
968
+ }
969
+
955
970
  //endregion
956
971
 
957
972
  //region BarcodePick
@@ -1045,12 +1060,6 @@ class ScanditBarcodeNative :
1045
1060
  call.resolve()
1046
1061
  }
1047
1062
 
1048
- @PluginMethod
1049
- fun viewPause(call: PluginCall) {
1050
- barcodePickModule.viewPause()
1051
- call.resolve()
1052
- }
1053
-
1054
1063
  @PluginMethod
1055
1064
  fun viewStart(call: PluginCall) {
1056
1065
  barcodePickModule.viewStart()
@@ -1062,6 +1071,11 @@ class ScanditBarcodeNative :
1062
1071
  barcodePickModule.viewFreeze(CapacitorResult(call))
1063
1072
  }
1064
1073
 
1074
+ @PluginMethod
1075
+ fun pickViewStop(call: PluginCall) {
1076
+ barcodePickModule.viewStop()
1077
+ call.resolve()
1078
+ }
1065
1079
 
1066
1080
  @PluginMethod
1067
1081
  fun finishPickAction(call: PluginCall) {