Closed femrek closed 3 years ago
Same here
The thing is my project uses scanner, shared preferences and back ground fetch.
qrscan: ^0.2.19 shared_preferences: ^0.5.12 background_fetch: ^0.6.0
We have configured a task that should execute headless. While executing the task, we try to read and write using shared preference.
However due to qrscan, the following issue occurs.
from backgroundFetchHeadlessTask smartscaffolder.smartinspector.sync [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)
This error occurs if I remove off qrscan from my pubspec.yaml.
It will be very helpful to get this fixed at the earliest.
@leyan95 Can you please publish a fix for this issue ?
@rajkumar82 Please try upgrading to the latest version - 0.2.20 Need to request permission in your own project
await Permission.camera.request();
String barcode = await scanner.scan();
Thank you very much for the quick support !! Version 0.2.20 works as expected.
This ticket was about asking unnecessarily for permissions at app startup? Why do you close it as it is not fixed?
@ndhbr Sorry, I was under the impression that it had been fixed in the latest version
@leyan95 No problem, but thanks for the plugin.
This issue is solved with this commit: https://github.com/leyan95/qrcode_scanner/commit/c7f6f87e70a9b65ae1cfbb3fc2b4fa4d3afc137b
Thanks for fix
I am using this lib for just scan qrcode and i don't need storage permission but if i add qrscan to dependencies, storage permission dialog is shown by default.
If i remove lines about storage permission in the following files, the problem disappears but this modify is only available on my computer (If someone compiles my project's source code this problem will repeat). https://github.com/leyan95/qrcode_scanner/blob/master/android/src/main/java/com/shinow/qrscan/CheckPermissionUtils.java https://github.com/leyan95/qrcode_scanner/blob/master/android/src/main/AndroidManifest.xml
(i only tried this lib on android app)