capacitor-community / barcode-scanner

A fast and efficient (QR) barcode scanner for Capacitor
MIT License
437 stars 172 forks source link

Add support for multiple scan (multiple barcode at once) #168

Closed HunSpeedi closed 1 year ago

HunSpeedi commented 1 year ago

I saw that there was a question regarding continuous scanning. And got me wondering if it is possible to scan multiple barcodes at once. So not just continuously scanning without closing the camera but capturing all the visible barcodes in the image in one go.

thegnuu commented 1 year ago

With the current implementation this is not working really well. The currently used libs on Android and iOS will only return the first detected code (if you center to another code, this should be de the first detected and therefore it is kind of possible), the "multiple option" is disable since the results are not consistent at all.

We are working on a MLKit rewrite which should make this possible and should provide better results, but I guess the initial version will keep the "one code at a time" behaviour. But it should be possible to read up to 10 codes in a more consistent way than the actual implementation. The new version will then provide a stream of all the detected codes and the logic which one to use aso. has to be handled by de developer :)

HunSpeedi commented 1 year ago

This sounds good, there is any anticipation about when this new version will be released? Or where I can follow it to be informed when it is ready to test/use?

smachi commented 1 year ago

@thegnuu Any advances on the ml-kit implementation?

thegnuu commented 1 year ago

@smachi Let me check that, someone else is working on the Android part at the moment :)

@HunSpeedi there is currently a branch, but only the iOS version is working. There are still small things to do, but in general it should work.

HunSpeedi commented 1 year ago

@smachi @thegnuu Thank you guys!! I am interested mainly in Android so I will follow the ml-kit branch. If you feel it ready or anything and this conversation crosses your mind and you leave a comment here that would be really appreciated. Thank you again :))

thegnuu commented 1 year ago

@HunSpeedi I just received a PR for the Android implementation. I will do my best to check and merge this ASAP so you have a version to play around with. I hope I can finish it by the end of this week :)

thegnuu commented 1 year ago

@HunSpeedi @smachi I just released v5.0.0-beta.1, the initial pre-release which uses ml-kit! There is still some work to be done, but I should deliver quite good results already :)

HunSpeedi commented 1 year ago

@thegnuu Thank you!! I hope I will have some time in the near future to try it!!