-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Didn't work any more ! #163
Comments
Same problem here, not working at all plugin versoin: 2.0.0 |
I'm facing the same problem. plugin versoin: 2.0.0 |
Hi, I was able to fix this issue by bumping the gradle dependency version of MLKit. Go to: /Users/{username}/.pub-cache/hosted/pub.dartlang.org/qr_mobile_vision-2.0.0/android (on mac) open build.gradle and change mlkit dependency to latest version. dependencies { |
Having similar issue, might be connected:
Bumping MLKit version did not fix it. More info: I went into the plugin and tried to look at the image that's passed to detector. When trying to decodeByteArray into bitmap from image I get null which means bitmap is invalid. There is some data in byte array but it looks lik it's invalid. WORKING UPDATE: If I force deprecated Camera 1 plugin it works. Obviously not a real fix, but you can test it:
|
Found a workaround for android. Go to /android/build.gradle and add this to your dependencies:
|
This seems to be device/screen size related. While working fine on a large variety of phones, it was not working on a pixel 5. I think it is related to the size of the preview, beacause it did work on the pixel 5, after changing the dimensions of the camera preview |
I'm facing the same issue. Barcode scanning works fine on many Android phones but it does not work on a Pixel 4. @Manuel-Indlekofer, what did you mean by changing the size of the preview? Did you change the size of the QrCamera widget to a static value? |
@gyenesandras yes. For testing purposes i set the preview to a fixed size of 300x600. This worked fine on the pixel5. I also had success using the suggested dependency
|
@Manuel-Indlekofer, thank you! |
Hi, any idea how to reproduce this in the emulator? I've tried to make an emulator with screen size 480 x 800, but still can't reproduce the issue. |
Hi all, i found a solution long time ago and the plugin works, but i forgot this open issue. so i currently writing this comment when i saw this thread. Just change the size of camera widget to 600X600 and it will work ... Put the QrCamera() widget inside Container() widget with height 600 and it will work, thank you. |
the plugin didn't work any more ..
the callback function not triggered ...
tried many times, different qr codes , but same results ..
plugin versoin: 2.0.0
test device: Realme 5
android: 10
flutter Version: 1.22.5 stable
dev system: win 10
android studio: 4.1.1
gradle: 6.1.1
compilesdk: 30
targetsdk: 30
The text was updated successfully, but these errors were encountered: