Closed asadwan closed 1 week ago
Guten Tag, Hans here. Danke for your suggestion regarding ze configurable resolution for ze code scanner on Android. However, it seems dat this is more of a feature request rather than an issue. We kindly ask you to open a new request with proper details using our issue template for feature requests. If you would like to support ze development of this project, consider sponsoring mrousavy here. Cheers! 🍻
Note: If you think I made a mistake by closing this issue, please ping
@mrousavy
to take a look.
Hey thanks for creating this feature request, but sorry but I don't think this is something I will be working on. I don't see a lot of value in this because you can simply create a Frame Processor which does exactly that - it uses videoResolution
and you can do even more advanced stuff inside of it.
I don't want to overcomplicate the QR Code Scanner because as you can see a lot of people simply want it to do "everything", and this is not what VisionCamera is about. You have so much flexibility to do this yourself in a Frame Processor and I think it should stay that way to avoid allocating all my time on a QR code scanner.
Hey thanks for creating this feature request, but sorry but I don't think this is something I will be working on. I don't see a lot of value in this because you can simply create a Frame Processor which does exactly that - it uses
videoResolution
and you can do even more advanced stuff inside of it.I don't want to overcomplicate the QR Code Scanner because as you can see a lot of people simply want it to do "everything", and this is not what VisionCamera is about. You have so much flexibility to do this yourself in a Frame Processor and I think it should stay that way to avoid allocating all my time on a QR code scanner.
Hi @mrousavy I'd like first to thank you for your amazing work and for your reply. Would you be open to accepting a PR for it? The way I see it is that today it works for iOS but not Android and it should be consistent across the board.
Would you be open to accepting a PR for it?
Thanks for the offer, but no, for the following reasons;
I'm really making sure the codebase in VisionCamera is as lean and simple and maintainable as possible to avoid VisionCamera from becoming a dead repo. A lot of repos just go dead because too much messy code lands in it.
- There is no way to configure the Code Scanner resolution alone on iOS. It always chooses it's own resolution. So this is an Android-only feature, which I want to avoid.
It's possible that I misunderstood but from your comments here https://github.com/mrousavy/react-native-vision-camera/issues I got the impression that it already works on iOS but not Android
No, iOS does not let you choose a resolution for the Code Scanner afaik.
Both iOS and Android however allow you to choose a resolution for the Frame Processor.
- There is no way to configure the Code Scanner resolution alone on iOS. It always chooses it's own resolution. So this is an Android-only feature, which I want to avoid.
It's possible that I misunderstood but from your comments here https://github.com/mrousavy/react-native-vision-camera/issues I got the impression that it already works on iOS but not Android
I mislinked the issue in question https://github.com/mrousavy/react-native-vision-camera/issues/1970#issuecomment-1776789866
No, iOS does not let you choose a resolution for the Code Scanner afaik.
Both iOS and Android however allow you to choose a resolution for the Frame Processor.
And would you be open to increasing the barcode scanner's hardcoded resolution? 1280x720 seems pretty low
1280x720 is the recommended default by Android/CameraX. Anything larger is hard to keep up for slower phones and will likely increase latency.
What feature or enhancement are you suggesting?
Code scanner on Android has a resolution of 1280x720 and unlike iOS, is not configurable with
format.videoResolution
. Due to the low resolution, we are encountering issues scanning long barcodes. It would be great if scanner resolution could be configurable on Android like iOS.What Platforms whould this feature/enhancement affect?
Android
Alternatives/Workarounds
To workaround the issue, we are using a fork with higher resolution hardcoded https://github.com/dashdoc/react-native-vision-camera
Additional information