Ralf Kistner

Results 157 comments of Ralf Kistner

What you're looking for is setCropRect(). It is currently set here: https://github.com/journeyapps/zxing-android-embedded/blob/9319110de8927fb4771b928eaf795e43999d8529/zxing-android-embedded/src/com/journeyapps/barcodescanner/BarcodeView.java#L179 So you can subclass `BarcodeView` and override `getPreviewFramingRect()`. The default implementation is here: https://github.com/journeyapps/zxing-android-embedded/blob/9319110de8927fb4771b928eaf795e43999d8529/zxing-android-embedded/src/com/journeyapps/barcodescanner/CameraPreview.java#L833-L853

My previous comment was slightly incorrect. Try overriding `calculateFramingRect()` instead.

This project is community-supported, so we can only provide support over GitHub issues for this.

Pull requests for this would be appreciated.

It should be possible to do something like that. Do you know of any existing open source applications doing this, which we can use as a starting point, instead of...

There are a few ways to optimize it to reduce the performance impact: 1. Only check once every few frames. You don't want to turn the flash on and off...

@AndreyNazarchuk No plans currently, but pull requests are welcome.

@ekahannah When this happens, there is typically also another error a few lines earlier with more details on why the camera could not be opened (e.g. camera already in use)....

@antileks Which version of the library are you using?

I recommend upgrading to the latest version in that case - quite a few fixes has been made since then, which may affect this issues as well.