patzly / grocy-android

ERP beyond your fridge, now on your phone – An awesome companion app for grocy
https://patrickzedler.com/grocy/
GNU General Public License v3.0
830 stars 80 forks source link

Stuck with front camera only/mirror problem #818

Closed martinrosenauer closed 5 months ago

martinrosenauer commented 6 months ago

First of all - thanks a lot for producing this app on top of the great Grocy. I am stuck with an Android 8.1 based tablet that only has a front camera. Unfortunately this means the barcodes are mirrored and hence unreadable for Grocy-Android (3.5). I see this was also reported as issue 688, but couldn't work out if it was something that was intended to be solved somehow?

Tried the setting of "Use front camera" which unfortunately causes the crash seen in the screenshot.image

Thanks in advance!

dominiczedler commented 5 months ago

Hey, thanks for your compliment!

If you mean issue #668, this can't be solved. Most of the front cameras of older tablets are low quality, so maybe that is the problem (in this case the tablet would not be suitable for barcode scanning unfortunately). The crash has nothing to do with it, I can investigate why this occurs. But generally, the barcode scanner does not look for a barcode in the mirrored image stream, only the visible picture is mirrored for better usability (I don't know, this is not handled by us). You can try if other scanner apps from the Play store work with your camera, if yes then you can reopen this issue and I could look what the cause could be.

martinrosenauer commented 5 months ago

Thanks Dominic, I tried another app

https://play.google.com/store/apps/details?id=com.ss9205.barcodechecker&hl=en_US

which seems to work well scanning the barcodes with the front cam.

dominiczedler commented 5 months ago

Thanks, could you please tell me the barcode scanner which you have set in our app? Is it ML Kit or ZXing (settings page -> scanner, if installed from Google Play or GitHub, else it is ZXing in F-Droid version).

martinrosenauer commented 5 months ago

Thanks, could you please tell me the barcode scanner which you have set in our app? Is it ML Kit or ZXing (settings page -> scanner, if installed from Google Play or GitHub, else it is ZXing in F-Droid version).

Looks like it helped a great deal to remove the app (believe I installed it using Aurora Store) and install v3.5 from F-Droid. The camera comes up with a version with red horizontal line and is now able to scan the test barcode I tried with. Interesting and positive 😃 Looking for the Danish language though, but perhaps I recall wrongly that it should be there ..

Thanks for all your help and effort in the app!

patzly commented 5 months ago

The Danish translation is only 21% complete, so it isn't included in any version of the app: https://app.transifex.com/patzly/grocy-android/language/da/ You could work on it! Glad that the scanner now works! This means you had MLKit manually enabled in the other version, the scanner with the red line (XZing) is default.

martinrosenauer commented 5 months ago

Got it - will look into that and see if I can help !