scandit-capacitor-datacapture-barcode 7.6.1 → 7.6.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.
@@ -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.6.1'
20
+ s.dependency "scandit-datacapture-frameworks-barcode", '= 7.6.3'
21
21
  end
@@ -89,7 +89,7 @@ repositories {
89
89
  }
90
90
 
91
91
  dependencies {
92
- def sdk_version = "7.6.1"
92
+ def sdk_version = "7.6.3"
93
93
 
94
94
  implementation fileTree(dir: 'libs', include: ['*.jar'])
95
95
  implementation fileTree(dir: 'library', include: ['*.aar'])
@@ -248,7 +248,7 @@ class ScanditBarcodeNative :
248
248
 
249
249
  @PluginMethod
250
250
  fun resetBarcodeCaptureSession(call: PluginCall) {
251
- barcodeCaptureModule.resetSession(call.data.getLong("frameSequenceId"))
251
+ barcodeCaptureModule.resetSession()
252
252
  call.resolve()
253
253
  }
254
254
 
@@ -1500,8 +1500,7 @@ class ScanditBarcodeNative :
1500
1500
 
1501
1501
  @PluginMethod
1502
1502
  fun stopSparkScanViewScanning(call: PluginCall) {
1503
- // Noop
1504
- call.resolve()
1503
+ sparkScanModule.stopScanning(getViewId(call), CapacitorResult(call))
1505
1504
  }
1506
1505
 
1507
1506
  @PluginMethod
package/dist/barcode.js CHANGED
@@ -3420,7 +3420,7 @@ class BarcodeCaptureListenerController extends BaseNewController {
3420
3420
  });
3421
3421
  }
3422
3422
  reset() {
3423
- return this._proxy.$resetBarcodeCaptureSession({ modeId: this.modeId });
3423
+ return this._proxy.$resetBarcodeCaptureSession();
3424
3424
  }
3425
3425
  setModeEnabledState(enabled) {
3426
3426
  this._proxy.$setBarcodeCaptureModeEnabledState({ modeId: this.modeId, enabled });
@@ -8205,10 +8205,12 @@ class SparkScanViewController extends BaseNewController {
8205
8205
  return this._proxy.$stopSparkScanViewScanning({ viewId: this.viewInstanceId });
8206
8206
  }
8207
8207
  pauseScanning() {
8208
- if (!this.isViewCreated) {
8209
- return Promise.resolve(); // No updates if view not created yet
8210
- }
8211
- return this._proxy.$pauseSparkScanViewScanning({ viewId: this.viewInstanceId });
8208
+ return __awaiter(this, void 0, void 0, function* () {
8209
+ if (!this.isViewCreated) {
8210
+ return Promise.resolve(); // No updates if view not created yet
8211
+ }
8212
+ return this._proxy.$pauseSparkScanViewScanning({ viewId: this.viewInstanceId });
8213
+ });
8212
8214
  }
8213
8215
  startScanning() {
8214
8216
  if (!this.isViewCreated) {
@@ -8222,6 +8224,12 @@ class SparkScanViewController extends BaseNewController {
8222
8224
  }
8223
8225
  return this._proxy.$prepareSparkScanViewScanning({ viewId: this.viewInstanceId });
8224
8226
  }
8227
+ onHostPause() {
8228
+ if (!this.isViewCreated) {
8229
+ return Promise.resolve(); // No updates if view not created yet
8230
+ }
8231
+ return this._proxy.$onHostPauseSparkScanView({ viewId: this.viewInstanceId });
8232
+ }
8225
8233
  showToast(text) {
8226
8234
  if (!this.isViewCreated) {
8227
8235
  return Promise.resolve(); // No updates if view not created yet
@@ -8376,6 +8384,9 @@ class BaseSparkScanView {
8376
8384
  sparkScan: props.sparkScan,
8377
8385
  settings: props.sparkScanViewSettings,
8378
8386
  });
8387
+ if (props.shouldHandleAndroidLifecycleAutomatically !== undefined && props.shouldHandleAndroidLifecycleAutomatically !== null) {
8388
+ view.shouldHandleAndroidLifecycleAutomatically = props.shouldHandleAndroidLifecycleAutomatically;
8389
+ }
8379
8390
  if (props.uiListener) {
8380
8391
  view.uiListener = props.uiListener;
8381
8392
  }
@@ -8464,6 +8475,7 @@ class BaseSparkScanView {
8464
8475
  this._triggerButtonImage = BaseSparkScanView.sparkScanDefaults.SparkScanView.triggerButtonImage;
8465
8476
  this._torchControlVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.torchControlVisible;
8466
8477
  this._previewCloseControlVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.previewSizeControlVisible;
8478
+ this.shouldHandleAndroidLifecycleAutomatically = true;
8467
8479
  this._sparkScan = sparkScan;
8468
8480
  this.context = context;
8469
8481
  this._viewSettings = settings !== null && settings !== void 0 ? settings : new SparkScanViewSettings();
@@ -8693,35 +8705,58 @@ class BaseSparkScanView {
8693
8705
  this.update();
8694
8706
  }
8695
8707
  showToast(text) {
8696
- this._controller.showToast(text);
8708
+ return __awaiter(this, void 0, void 0, function* () {
8709
+ yield this._controller.showToast(text);
8710
+ });
8697
8711
  }
8698
8712
  prepareScanning() {
8699
- this._controller.prepareScanning();
8713
+ return __awaiter(this, void 0, void 0, function* () {
8714
+ yield this._controller.prepareScanning();
8715
+ });
8700
8716
  }
8701
8717
  startScanning() {
8702
- this._controller.startScanning();
8718
+ return __awaiter(this, void 0, void 0, function* () {
8719
+ yield this._controller.startScanning();
8720
+ });
8703
8721
  }
8704
8722
  pauseScanning() {
8705
- this._controller.pauseScanning();
8723
+ return __awaiter(this, void 0, void 0, function* () {
8724
+ yield this._controller.pauseScanning();
8725
+ });
8706
8726
  }
8707
8727
  stopScanning() {
8708
- this._controller.stopScanning();
8728
+ return __awaiter(this, void 0, void 0, function* () {
8729
+ yield this._controller.stopScanning();
8730
+ });
8731
+ }
8732
+ onHostPause() {
8733
+ return __awaiter(this, void 0, void 0, function* () {
8734
+ yield this._controller.onHostPause();
8735
+ });
8709
8736
  }
8710
8737
  update() {
8711
- return this._controller.updateView();
8738
+ return __awaiter(this, void 0, void 0, function* () {
8739
+ yield this._controller.updateView();
8740
+ });
8712
8741
  }
8713
8742
  dispose() {
8714
8743
  this._controller.dispose();
8715
8744
  }
8716
8745
  show() {
8717
- return this._show();
8746
+ return __awaiter(this, void 0, void 0, function* () {
8747
+ yield this._show();
8748
+ });
8718
8749
  }
8719
8750
  hide() {
8720
- return this._hide();
8751
+ return __awaiter(this, void 0, void 0, function* () {
8752
+ yield this._hide();
8753
+ });
8721
8754
  }
8722
8755
  createNativeView(viewId) {
8723
- this._viewId = viewId;
8724
- return this._controller.createView();
8756
+ return __awaiter(this, void 0, void 0, function* () {
8757
+ this._viewId = viewId;
8758
+ yield this._controller.createView();
8759
+ });
8725
8760
  }
8726
8761
  get feedbackDelegate() {
8727
8762
  return this._feedbackDelegate;
@@ -8736,6 +8771,10 @@ class BaseSparkScanView {
8736
8771
  }
8737
8772
  }
8738
8773
  updateWithProps(prevProps, props) {
8774
+ if (props.shouldHandleAndroidLifecycleAutomatically !== prevProps.shouldHandleAndroidLifecycleAutomatically &&
8775
+ props.shouldHandleAndroidLifecycleAutomatically !== undefined) {
8776
+ this.shouldHandleAndroidLifecycleAutomatically = props.shouldHandleAndroidLifecycleAutomatically;
8777
+ }
8739
8778
  // Update UI Listener
8740
8779
  if (props.uiListener !== prevProps.uiListener) {
8741
8780
  this.uiListener = props.uiListener || null;
@@ -8860,6 +8899,7 @@ class BaseSparkScanView {
8860
8899
  previewCloseControlVisible: this.previewCloseControlVisible,
8861
8900
  hasUiListener: this.uiListener !== null,
8862
8901
  viewId: this.viewId,
8902
+ shouldHandleAndroidLifecycleAutomatically: this.shouldHandleAndroidLifecycleAutomatically,
8863
8903
  };
8864
8904
  if (this._viewSettings != null) {
8865
8905
  json.viewSettings = (_a = this._viewSettings) === null || _a === void 0 ? void 0 : _a.toJSON();