Description
Plugin(s)
- Barcode Scanning
- Face Detection
- Face Mesh Detection
- Selfie Segmentation
- Translation
Version
7.0.0, 7.1.0
Platform(s)
- Android
- iOS
- Web
Current behavior
when trying to scan a barcode within the sight (box) with the demo app it will not recognize that the barcode is within the boundaries of the sight. On IOS this works fine.
When moving further away from the barcode the app will scan the barcode.
Expected behavior
The scanner should scan a barcode when its within the boundaries of the sight.
Reproduction
https://github.com/robingenz/capacitor-mlkit-plugin-demo
Steps to reproduce
- clone and start the demo app on android.
- upgrade dependencies (optional as it does not work on 7 and 7.1 for me)
- click start scan (the first button)
- try to scan a barcode while being "close" to the barcode
- Move further away from the barcode -> the scan will work
screen-20250306-084735.mp4
Other information
i am currently in the process of upgrading our app from capacitor 6 to 7 and noticed that the scanner does not work well on android. When using version 6.2 (@capacitor-mlkit/barcode-scanning) the scan works fine and is very fast with version 7 it starts to have the issue described above.
Today i tried if the issue exists with the demo app that is available and it has the same issue.
When you log what the "barcodesScanned" event emits you can see that it will detect the barcode but the corner points are outside of the sight
The device i am using is a Fairphone 4 with Android 13
Capacitor doctor
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 7.0.1
@capacitor/core: 7.0.1
@capacitor/android: 7.0.1
@capacitor/ios: 7.0.1
Installed Dependencies:
@capacitor/cli: 7.0.0
@capacitor/core: 7.0.1
@capacitor/ios: 7.0.1
@capacitor/android: 7.0.1
[success] iOS looking great! 👌
[success] Android looking great! 👌
Before submitting
- I have read and followed the bug report guidelines.
- I have attached links to possibly related issues and discussions.
- I understand that incomplete issues (e.g. without reproduction) are closed.