scandit-capacitor-datacapture-barcode 7.3.0-beta.2 → 7.4.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", '= 7.3.0-beta.2'
20
+ s.dependency "scandit-datacapture-frameworks-barcode", '= 7.4.0-beta.1'
21
21
  end
@@ -89,7 +89,7 @@ repositories {
89
89
  }
90
90
 
91
91
  dependencies {
92
- def sdk_version = "7.3.0-beta.2"
92
+ def sdk_version = "7.4.0-beta.1"
93
93
 
94
94
  implementation fileTree(dir: 'libs', include: ['*.jar'])
95
95
  implementation fileTree(dir: 'library', include: ['*.aar'])
@@ -1073,7 +1073,7 @@ class ScanditBarcodeNative :
1073
1073
 
1074
1074
  call.resolve()
1075
1075
  } ?: run {
1076
- error("missing parameter for createPickView()")
1076
+ call.reject("missing parameter for createPickView()")
1077
1077
  }
1078
1078
  }
1079
1079
 
@@ -1094,9 +1094,19 @@ class ScanditBarcodeNative :
1094
1094
  @PluginMethod
1095
1095
  fun setPickViewPositionAndSize(call: PluginCall) {
1096
1096
  try {
1097
- val positionJson = call.data.getString("position")
1098
- ?: return call.reject("No position was given for setting the view.")
1099
- val info = JSONObject(positionJson)
1097
+ val top = call.getDouble("top") ?: return call.reject("Missing top position")
1098
+ val left = call.getDouble("left") ?: return call.reject("Missing left position")
1099
+ val width = call.getDouble("width") ?: return call.reject("Missing width")
1100
+ val height = call.getDouble("height") ?: return call.reject("Missing height")
1101
+ val shouldBeUnderWebView = call.getBoolean("shouldBeUnderWebView", false)
1102
+
1103
+ val info = JSONObject().apply {
1104
+ put("top", top)
1105
+ put("left", left)
1106
+ put("width", width)
1107
+ put("height", height)
1108
+ put("shouldBeUnderWebView", shouldBeUnderWebView)
1109
+ }
1100
1110
  barcodePickViewHandler.setResizeAndMoveInfo(ResizeAndMoveInfo(info))
1101
1111
  call.resolve()
1102
1112
  } catch (e: JSONException) {
@@ -1105,34 +1115,34 @@ class ScanditBarcodeNative :
1105
1115
  }
1106
1116
 
1107
1117
  @PluginMethod
1108
- fun addActionListener(call: PluginCall) {
1118
+ fun addPickActionListener(call: PluginCall) {
1109
1119
  barcodePickModule.addActionListener()
1110
1120
  call.resolve()
1111
1121
  }
1112
1122
 
1113
1123
  @PluginMethod
1114
- fun removeActionListener(call: PluginCall) {
1124
+ fun removePickActionListener(call: PluginCall) {
1115
1125
  barcodePickModule.removeActionListener()
1116
1126
  call.resolve()
1117
1127
  }
1118
1128
 
1119
1129
  @PluginMethod
1120
- fun addScanningListener(call: PluginCall) {
1130
+ fun addBarcodePickScanningListener(call: PluginCall) {
1121
1131
  barcodePickModule.addScanningListener(CapacitorResult(call))
1122
1132
  }
1123
1133
 
1124
1134
  @PluginMethod
1125
- fun removeScanningListener(call: PluginCall) {
1135
+ fun removeBarcodePickScanningListener(call: PluginCall) {
1126
1136
  barcodePickModule.removeScanningListener(CapacitorResult(call))
1127
1137
  }
1128
1138
 
1129
1139
  @PluginMethod
1130
- fun addViewListener(call: PluginCall) {
1140
+ fun addPickViewListener(call: PluginCall) {
1131
1141
  barcodePickModule.addViewListener(CapacitorResult(call))
1132
1142
  }
1133
1143
 
1134
1144
  @PluginMethod
1135
- fun removeViewListener(call: PluginCall) {
1145
+ fun removePickViewListener(call: PluginCall) {
1136
1146
  barcodePickModule.removeViewListener(CapacitorResult(call))
1137
1147
  }
1138
1148
 
@@ -1157,13 +1167,25 @@ class ScanditBarcodeNative :
1157
1167
  }
1158
1168
 
1159
1169
  @PluginMethod
1160
- fun viewStart(call: PluginCall) {
1170
+ fun registerOnProductIdentifierForItemsListener(call: PluginCall) {
1171
+ // Noop
1172
+ call.resolve()
1173
+ }
1174
+
1175
+ @PluginMethod
1176
+ fun unregisterOnProductIdentifierForItemsListener(call: PluginCall) {
1177
+ // Noop
1178
+ call.resolve()
1179
+ }
1180
+
1181
+ @PluginMethod
1182
+ fun pickViewStart(call: PluginCall) {
1161
1183
  barcodePickModule.viewStart()
1162
1184
  call.resolve()
1163
1185
  }
1164
1186
 
1165
1187
  @PluginMethod
1166
- fun viewFreeze(call: PluginCall) {
1188
+ fun pickViewFreeze(call: PluginCall) {
1167
1189
  barcodePickModule.viewFreeze(CapacitorResult(call))
1168
1190
  }
1169
1191