Any change [assembly: UsesPermission(Android.Manifest.Permission.Camera)] could be removed?
Using this library only for Aztec generation and from what I can see it doesn't really require camera permissions to do so.
Would be excellent if this was not forced into the app.
Hmm that's a good point, and definitely a valid use case. I'm not sure how to go about doing this without breaking everyone's app that expects this to be there. Perhaps this should go in a major version bump.
@Redth I am a bit confused about permission handling...
ZXing.Net.Mobile for Xamarin.Forms also handles the new Android permission request model for you, but you will need to add the following override implementation to your main Activity as well
Why do I need this? currently the camera permission is automatically added via [assembly: UsesPermission... but I would like to let the user decide that, at runtime, when the scanner starts...
(similar to iOS)
Any tipps how to achieve that?
@MKahmen You can't at the moment. @Redth added it to the 3.x milestone, so anyone that feels like it can submit a PR.
Any update on this issue? Still 3.x?
This needs to go in 3.x still. I'm planning on fixing things up to work with .net standard 2.0 nicely very very soon, which should probably be a 3.x at which point we could include this.
Is there any update to this? We only use ZXing for barcode generation, no scanning whatsoever, so having the camera permission pop up in the app (as well as file read/write and flashlight) is unnecessary. Would be great if there was some way of disabling the camera features of ZXing so the permission is never required
This is something that I am interested in for my projects as well. I started using this package for generating QR Codes and nothing else, but I found that it was requiring the camera permission even though I am not using that part of the package. This became more of a problem when I determined that the camera feature listed as required android.hardware.camera is not satisfied by devices with the android.hardware.camera.any or android.hardware.camera.front features. This caused many Chromebooks and tablets to no longer be supported.
I ended up opting for the QRCoder package instead. I will eventually want to use ZXing as I incorporate scanning into some of the features, but I am wary of that now that I know it will negatively impact my list of supported devices.
Let me know if I can provide any information to help.
Thanks for reporting this issue! Unforunately it took me way too long to respond 馃槶. Sorry, I apologize! Recently the source code for this project was completely refactored to modernize it. Many PR's were included in this effort, and many bugs were hopefully fixed. Please try out the latest 3.x series of NuGet packages (currently in prerelease). To try and make the project more maintainable in my spare time going forward, I've decided to close all existing issues to start with a clean slate. If you're still experiencing this issue on the newest version, please open a new issue with as much detail as possible. Thank you for your patience and understanding! Happy scanning!
Most helpful comment
Hmm that's a good point, and definitely a valid use case. I'm not sure how to go about doing this without breaking everyone's app that expects this to be there. Perhaps this should go in a major version bump.