capawesome-team / capacitor-mlkit

⚡️ ML Kit plugins for Capacitor. Supports Android and iOS.
https://capawesome.io/plugins/mlkit/
Apache License 2.0
140 stars 39 forks source link

bug: cannot scan with phone facing an angle of 30-45 degrees (iOS) #101

Closed nicolasmohamed closed 9 months ago

nicolasmohamed commented 9 months ago

Plugin(s)

Did you test the latest version?

Platform(s)

Current behavior

plugin does not scan a QR code when the phone is facing an angle of 30-45 degrees (previous plugin from capacitor worked OK)

Expected behavior

plugin scans correctly with the phone facing an angle of 30-45 degrees

Reproduction

Happens with any project/code

Steps to reproduce

  1. Open the plugin
  2. Put the phone in an angle like between 30 and 45 degrees
  3. Try to scan a QR code

Other information

It happens with any project/code. We find it very odd that no one has reported it yet.

Capacitor doctor

-

Before submitting

robingenz commented 9 months ago

Please share an image for testing (I'm not sure if I'm allowed to post the picture from your email here).

nicolasmohamed commented 9 months ago

qr_facing_angle Here's an example. Thanks.

robingenz commented 9 months ago

Thank you! I will take a look at it.

robingenz commented 9 months ago

I can reproduce your issue with my demo app.

However, the problem does not seem to be the angle, but the QR code itself. It works for me with a different QR code at this angle. The problem should not be with the plugin but with the ML Kit Library. It does not recognize QR codes on this image. I have tried both with the camera and via FilePicker.

I am therefore closing this issue for the time being and recommend creating an issue in https://github.com/googlesamples/mlkit. Feel free to keep me up to date and link this issue.

nicolasmohamed commented 9 months ago

Ok Robin, will do. Just for the record, it was working OK with zxing implementation. We'll compile a legacy app. Cannot believe I'm writing this in nov-2023 but I understand it has nothing to do with this plugin. Thanks.