scandit-capacitor-datacapture-barcode 8.6.2 → 8.7.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.
@@ -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", '= 8.6.2'
20
+ s.dependency "scandit-datacapture-frameworks-barcode", '= 8.7.0'
21
21
  end
@@ -143,7 +143,7 @@ if (ext.has('repos')) {
143
143
  }
144
144
 
145
145
  dependencies {
146
- def sdk_version = "8.6.2"
146
+ def sdk_version = "8.7.0"
147
147
 
148
148
  implementation fileTree(dir: 'libs', include: ['*.jar'])
149
149
  implementation fileTree(dir: 'library', include: ['*.aar'])
@@ -41,6 +41,8 @@ import com.scandit.datacapture.frameworks.core.CoreModule;
41
41
  import com.scandit.datacapture.frameworks.core.FrameworkModule;
42
42
  import com.scandit.datacapture.frameworks.core.errors.ParameterNullError;
43
43
  import com.scandit.datacapture.frameworks.core.events.Emitter;
44
+ import com.scandit.datacapture.frameworks.core.listeners.registry.ListenerRegistry;
45
+ import com.scandit.datacapture.frameworks.core.listeners.registry.RegistryEmitter;
44
46
  import com.scandit.datacapture.frameworks.core.locator.DefaultServiceLocator;
45
47
  import com.scandit.datacapture.frameworks.core.result.NoopFrameworksResult;
46
48
  import com.scandit.datacapture.frameworks.core.utils.DefaultFrameworksLog;
@@ -86,10 +88,11 @@ public class ScanditBarcodeNative extends Plugin implements Emitter {
86
88
 
87
89
  public ScanditBarcodeNative() {
88
90
  this.barcodeModule = new BarcodeModule();
89
- this.barcodeCaptureModule = BarcodeCaptureModule.create(this);
90
- this.barcodeBatchModule = BarcodeBatchModule.create(this, null);
91
- this.barcodeSelectionModule = BarcodeSelectionModule.create(this);
92
- this.barcodeCountModule = BarcodeCountModule.create(this);
91
+ Emitter registryEmitter = new RegistryEmitter(this, ListenerRegistry.getInstance());
92
+ this.barcodeCaptureModule = BarcodeCaptureModule.create(registryEmitter);
93
+ this.barcodeBatchModule = BarcodeBatchModule.create(registryEmitter, null);
94
+ this.barcodeSelectionModule = BarcodeSelectionModule.create(registryEmitter);
95
+ this.barcodeCountModule = BarcodeCountModule.create(registryEmitter);
93
96
  this.barcodeFindModule = BarcodeFindModule.create(this);
94
97
  this.barcodePickModule = BarcodePickModule.create(this);
95
98
  this.sparkScanModule = SparkScanModule.create(this);
@@ -212,12 +215,13 @@ public class ScanditBarcodeNative extends Plugin implements Emitter {
212
215
  }
213
216
 
214
217
  @PluginMethod
215
- public void getDefaults(PluginCall call) {
218
+ public void getDynamicDefaults(PluginCall call) {
216
219
  try {
217
- JSObject defaults = JSObject.fromJSONObject(new JSONObject(barcodeModule.getDefaults()));
220
+ JSObject defaults =
221
+ JSObject.fromJSONObject(new JSONObject(barcodeModule.getDynamicDefaults()));
218
222
  call.resolve(defaults);
219
223
  } catch (JSONException e) {
220
- call.reject("Failed to get defaults: " + e.getMessage());
224
+ call.reject("Failed to get dynamic defaults: " + e.getMessage());
221
225
  }
222
226
  }
223
227