react-native-scanbot-barcode-scanner-sdk 3.5.0-beta.2 → 3.5.0-beta.4

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.
@@ -38,6 +38,7 @@ import io.scanbot.sdk.barcode.ScanbotBarcodeDetector;
38
38
  import io.scanbot.sdk.barcode.entity.BarcodeItem;
39
39
  import io.scanbot.sdk.barcode.entity.BarcodeScannerAdditionalConfig;
40
40
  import io.scanbot.sdk.barcode.entity.BarcodeScanningResult;
41
+ import io.scanbot.sdk.camera.CameraOpenCallback;
41
42
  import io.scanbot.sdk.camera.FrameHandlerResult;
42
43
  import io.scanbot.sdk.ui.camera.FinderOverlayView;
43
44
  import io.scanbot.sdk.ui.camera.ScanbotCameraXView;
@@ -177,6 +178,12 @@ public class ScanbotBarcodeCameraView extends FrameLayout implements BarcodeDete
177
178
  finderOverlayView.setRequiredAspectRatios(Collections.singletonList(config.getFinderAspectRatio()));
178
179
  finderOverlayView.requestLayout();
179
180
 
181
+ cameraView.setCameraOpenCallback(new CameraOpenCallback() {
182
+ @Override
183
+ public void onCameraOpened() {
184
+ cameraView.useFlash(config.isFlashEnabled());
185
+ }
186
+ });
180
187
  // Camera View
181
188
  cameraView.useFlash(config.isFlashEnabled());
182
189
 
@@ -86,7 +86,7 @@
86
86
  cameraViewConfiguration.codeDensity = extractBarcodeDensity(config);
87
87
  cameraViewConfiguration.finderInset = [self populateFinderInset:config];
88
88
 
89
- self.shouldUseFinderView = [config objectForKey:@"shouldUseFinderView"];
89
+ self.shouldUseFinderView = [[config objectForKey:@"shouldUseFinderView"] boolValue];
90
90
 
91
91
  } @catch (NSException *exception) {
92
92
  NSLog(@"%@", [exception reason]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-scanbot-barcode-scanner-sdk",
3
3
  "title": "Scanbot Barcode Scanner SDK for React Native",
4
- "version": "3.5.0-beta.2",
4
+ "version": "3.5.0-beta.4",
5
5
  "description": "Scanbot Barcode Scanner SDK React Native Plugin for Android and iOS",
6
6
  "main": "index.js",
7
7
  "files": [