yuriy-budiyev / code-scanner

Code scanner library for Android, based on ZXing
MIT License
1.09k stars 266 forks source link

Camera is dark due to FPSrate #193

Open Thomas-Pronovost92 opened 7 months ago

Thomas-Pronovost92 commented 7 months ago

Hi! I recently tried to integrate this code scanner to my project (v2.3.2). The preview of the camera is dark however on one of my test device a Fire HD 10 tablet.

I think that I have narrowed the issue down to the FPS rate, the one selected being [3000, 3000] (same value for max and min) In my way to implement a fix, I found that the classes are all final, thus untouchable unless I copy the project in my app, which I would like to avoid)

Here is the fix that worked for me (when I copied your project in my app: In Utils.configureFpsRange - > adding fpsRange[Parameters.PREVIEW_FPS_MIN_INDEX] != fpsRange[Parameters.PREVIEW_FPS_MAX_INDEX] in the if statement resolved the issue

So is there a reason why all classes are final? And would it be possible to remove this feature? Also, maybe a method could be added to select the FPSrate?