-
Notifications
You must be signed in to change notification settings - Fork 2
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
Barcode scanner #53
Comments
Duplication of #6 but provides more detail so I'd vote in favour of keeping this over the bot created #6. I'm currently using phonegap-plugin-barcodescanner, and a real limitation for me currently is that you have to re-open the scanner manually after each scan, and it's hard to automate reliably. It would be nice to have the ability to keep the scanner open and provide feedback as a code is successfully read (maybe a bar showing the last read data with the ability to discard). That way I can just produce an array of scanned barcodes very quickly instead of having the startup cost of re-initialising the camera every time. |
@alexcroox I'll close the other proposal in favor of this one. I know there's a QR scanner plugin for Capacitor, but I haven't personally used it: https://www.npmjs.com/package/@johnbraum/capacitor-qrscanner @johnbraum Would you care to weigh in on barcode support in your plugin? |
@dwieeb Sure I could do that. I was already planning that. Also an option to show a button to toggle the flashlight. I was thinking about an option object you can pass and set all barcode types & hide/show Flashlight button. For iOS I use the internal iOS Scanner (supports all types of barcodes) and for Android I am using the zxing BarcodeScannerView, also supports all types of barcodes. |
@johnbraum Sounds great! The thing I had with the existing barcode scanner for Cordova was that for example the lightbulb icon looked a bit outdated. Further the GUI was fine with with red scan line and the helping text for the users. |
@johnbraum I've added a feature overview, made a summary of the things mentioned in issue #6 and added a mockup |
@johnbraum I used your plugin on this barcode and it didn't seem to come back with a response for iOS. On Android, it worked great. QR codes also worked great on both platforms. Would you be willing to move your plugin to this Capacitor Community org on Github? You can learn more here. |
I have made a (qr) barcode scanner plugin for Capacitor: https://github.com/DutchConcepts/capacitor-barcode-scanner It is heavily influenced by https://github.com/bitpay/cordova-plugin-qrscanner with the following differences:
Because of the fact that I do not have infinite time on my hands, support for switching cameras and toggling flashlights is lacking. But I am sure that me or someone else will implement this sometime soon. Therefore, I think, for most people https://github.com/DutchConcepts/capacitor-barcode-scanner will be the better choice of the two. And if Capacitor decides to make it a community plugin, this will be a no-brainer. |
@tafelnl great! I've added your plugin to the "existing solutions" of my initial post. |
@tafelnl Real thanks for your solution! |
I do not quite understand what you are trying to do? Are you trying to replace ZXing in Java for Android with ZBar? I do not recommend to do so, because ZBar is very old and not maintained any more. If you are trying to make a web implementation with WebAssembly, I am sorry, I can not help you with that, as I do not have any experience with that. |
@tafelnl Thank for reply! Ok, thanks for recommendations. Do you plan add scan area to your plugin? |
@ashevchenko0309 You will have to add your own scan area design with HTML/CSS. I have added an example to the repo here: https://github.com/DutchConcepts/capacitor-barcode-scanner/tree/main/examples/scan-area-layout |
I know this is the capacitor community project, but I was wondering if it is possible to use e.g. @tafelnl plugin also in cordova based projects? Since all cordova qr scanner projects seem to be abonded, I am looking for a maintained solution. |
I am not aware of a plugin that transforms Capacitor plugins to Cordova plugins. |
much needed solution for capacitor... all other options are now not maintained or abandoned by developers... Hope ionic team will do something for this. |
Hope this is in your queue. |
@oke007 check out my plugin at https://github.com/DutchConcepts/capacitor-barcode-scanner It supports a lot of types of barcodes. Flashlight support will probably be implemented soon too. |
@tafelnl Are you on the Capacitor contributor slack? |
@dwieeb Yes, I am. You can find me by username |
I am using your plugin and it works amazing, looking forward to the flashlight support. |
I think it would make sense to add the generator side this as well. I have been using https://github.com/Cordobo/angularx-qrcode but is lacking angular 11 support. Not sure if there are barcode generators. |
@tellybrown There are several good QR generator libraries for JavaScript as well:
|
Hi all, Just to let you all know for QR Code Scanner specifically (no plans for Bar code scanning yet) we will have a new repository available and we are working on it here: https://github.com/diningcity-group/capacitor-qr-scanner It's only the beginning and there is only iOS code for now, but we plan on adding Android very soon and we plan on maintaining it long term. Will update this post when it's more ready for production use. |
@tafelnl I've used your barcode scanner for the past 3 months with great success. |
@mesqueeb Good to hear! It is already in the community github account. With the next release I will also publish it in the community npm account. ETA 22nd of February! |
Can you provide a video demo? |
It would look slightly different for now on iOS and Android since the code base is slightly different for both platforms, but over time we plan on merging/unifying the two of them. Best way I think for now is for you to just demo it in your project and launch it on each device and see it for yourself! |
Just published https://github.com/capacitor-community/barcode-scanner to community npm: https://www.npmjs.com/package/@capacitor-community/barcode-scanner So I guess this issue can be closed :) |
@tafelnl great! Would it be an idea if I copy my start post to this new repo? Otherwise the description of possible features etc. in the description will be lost in this issue. |
@tafelnl the only issue we currently have, is the lack of Capacitor 3 support. Is this something you are going to implement in the near feature? |
Yes, Capacitor 3 support will probably land before it hits a stable release! |
@tafelnl I saw torch on/off is on the todo, is there an estimate when this will be implemented? |
I implemented torch support on my fork(Android only). Usage: |
why not make a pull request? |
@tafelnl I added your plugin to awesome-capacitor if that is useful please take time to star the repo :) |
closing as https://github.com/capacitor-community/barcode-scanner exists now |
Plugin Request
Name: barcode-scanner
Package:
@capacitor-community/barcode-scanner
Platform(s)
Android, iOS (web would also be great, but not needed at first)
Existing Solutions
Description
Features which would be great (not in particular order):
This plugins allows a variety of solutions think of:
The milestones of development I could think about are:
Things that could be useful for implementation
iOS
Android
Mockup
The text was updated successfully, but these errors were encountered: