dm77 / barcodescanner

Barcode Scanner Libraries for Android
Other
5.46k stars 1.43k forks source link

HUAWEI P10 doesn't work. #365

Closed sg552 closed 7 years ago

sg552 commented 7 years ago

hi there, I found this lib doesn't work on HUAWEI P10. when scanning, the camera is too blur, and can not correctly auto-focused.
I checked out the bug https://github.com/dm77/barcodescanner/issues/249 , seems all the HUAWEI phone doesn't work due to the 'LEICA DUAL CAMERA' ? Waiting for someone's solution. my environment:

compile 'me.dm7.barcodescanner:zxing:1.9.8'
compileSdkVersion 25
buildToolsVersion "25.0.3"
Linux (Ubuntu 14 desktop) 

thanks, Siwei

dm77 commented 7 years ago

Thank you so much for the detailed report Siwei. I am trying to obtain a Huawei device and I have also read from other Hauwei users that the Camera 2 API is better supported on their devices. So I have been working on supporting the Camera 2 API. Will keep you posted

sg552 commented 7 years ago

I changed this parameter to 0.5f, it works like a charm!

mScannerView.setAspectTolerance(0.5f);
dm77 commented 7 years ago

Ah thank you so so much for letting me know about this.