mobile_scanner
mobile_scanner copied to clipboard
Samsung Galaxy A23 wrong scan area
- Mobile scanner 3.2.0
- Device Samsung Galaxy A23 (tested about 4 device with same result)
It seems that the detection area is located at the upper right screen edge and that it is very small, infact to detect codes i have to put the camera backward enough to reduce the framed code size and move it to the upper right screen edge.
Just tested using the scanWindow attribute but seems to be ignored.
Fixed uncommenting this line in MobileScanner.kt inside method start():
analysisBuilder.setTargetResolution(Size(1440, 1920))
I've tried out many resolutions and it always do the job, so i guess, for certain devices, target resolution for analysis builder must always be set.
This one solves the problem without any aspect ratio issue, no need to set target resolution anymore:
val camProfile = CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH)
analysisBuilder.setDefaultResolution(Size(camProfile.videoFrameWidth, camProfile.videoFrameHeight))
I don't know if this is the right solution but in my case i've tested many devices and everything seems working as aspected.
I've updated many times this comment, i finally discovered that just setting the default resolution solves the issue.
Did you tested on ios device?
@danielleung30 Yes, it works seamlessly. The issue affects only certain Android devices like Galaxy A22 and A23, but i think many others...
Thank you bro, you save the day
Hello, any news on this? When this issue will be resolved? Having the same symptoms reading QR code on A23.
I am working on an updated version of #612 which should fix this issue
Any one test version 3.5.1
Just tested version 3.5.1, nothing to do, the issue is, unfortunately, still there !!!
Tested on 4.0.0 and the issue is still there
Issue is easily resolved setting cameraResolution in MobileScannerController to some reasonable value , for example 1024, 768
Yes, but... still an issue. Also setting the resolution has other implications
Hi, Any update here?
The author of this plugin already managed to solve this issue, just set a 4:3 cameraResolution when constructing MobileScannerController.
final _scannerController = MobileScannerController(
// 24MPix with an aspect of 4:3
cameraResolution: const Size(6080, 8096),
);
Feel free to set a higher resolution, if not available it will be set using the nearest one.
Hope this will be useful!