Barcode Extension for BB10 #109

Closed
timwindsor opened this Issue Oct 18, 2012 · 28 comments

Projects

None yet

7 participants

@timwindsor
Member

Create an extension that can be used to scan barcodes using the ZXing library in BB10.

Current plan is to have the native code start the camera and listen for preview frames. Then pass the preview images into the ZXing library for decoding, while also Base64 encoding the image for sending to a callback in the JavaScript API. The callback will display the encoded image in a canvas or maybe an image tag. When a barcode is found, it will be sent back to a different callback in JavaScript. There also needs to be a cancel method.

@splatterb0y

This should not be an community extension, this should be part of webworks api.
Reading QR/Barcodes is pretty much standard for all apps these days and in my opinion I think a native solution will perform better.

The Tablet-Extension which is using the ZXing library is not capable of reading most of the QR/Barcodes I tried, which is really frustrating. A BB10 version should perform better than that.

@timwindsor
Member

@splatterb0y Community Extensions for BB10 and BB10 WebWorks APIs are all native. For Barcodes, the issue is the camera and processor - the ZXing library is the same in every case. The PlayBook's camera is not autofocus, and this makes the biggest difference, followed by processing speed, which needs to be reasonably high for good performance.

@splatterb0y

@timwindsor So the playbook hardware itself is the problem with reading barcodes?

@timwindsor
Member

I have done little to no testing on PlayBook specifically, but an autofocus camera is pretty much essential for it to work well for anything besides basic QR codes. There is a similar problem with BlackBerry smartphones running 7.0. They work okay for QR codes, but only the ones with autofocus cameras (like the newer Torch series) can handle 1D or other types of barcode. They should all be using a similar version of the ZXing library, just ported to the different OS. When we work with Enterprise customers who need a barcode solution, we recommend the 9810 typically.

@pmulkins
pmulkins commented Nov 9, 2012

I have converted an android app that has this functionally built in. I have used it on both the Playbook and Dev Alpha A. As you mention, from my experience the Playbook's lack of autofocus camera it does not work very well. But on the Alpha A it works very well. The application is Springpad, but I dont know enough about android and its API's to know more than that.

Regards,

Phil

@splatterb0y

@timwindsor @astanley
Any progress on this one? :(

@oparoz
oparoz commented Dec 18, 2012

+1 for this to be implemented ASAP

@lixam
lixam commented Dec 24, 2012

Any progress? I am looking for this prior the BB10 launch :D

@timwindsor
Member

We are working on it. We don't have as much progress as I'd hoped by this time, but it's a very high priority.

@splatterb0y

@timwindsor
Nice you give us an update on this one.

@lixam
lixam commented Dec 24, 2012

Thanks for this update! And thanks for that work you put into it!

@splatterb0y

Any progress? @timwindsor @astanley

@timwindsor
Member

We've done some groundwork that will help, and I've investigated a couple of development approaches. The way I had hoped to do it doesn't look like it's going to work, so I'm working on another approach.

@splatterb0y

Hi @timwindsor maybe this will help you?
http://badassjs.com/post/654334959/barcode-scanning-in-javascript
Maybe you can record a image with html5 and pass the image into this JS until a barcode is recognized.

@timwindsor
Member

That looks pretty cool, but I found that using the camera from JavaScript doesn't give quite enough control for this purpose. We're planning to use the camera at the native level and all we need are the preview buffer frames, which we can pass to the ZXing library for barcode analysis, and send to the web layer as well for the user to see what they are aiming at.

@ArthurCid

Any idea when the extension could be released ?

@timwindsor
Member

We did some good work on it on the weekend. I'm not certain how far we've got to go yet, but I should be able to track some status on it shortly.

@splatterb0y

To late for BB10 launch, but still nice to hear RIM has not gave up on this one. Thank you @timwindsor. 👍

@ArthurCid

Nice to know that you are actively working on it. Thanks @timwindsor ! Let us know how it's going ! (Maybe an early February release ? :) )

@splatterb0y

@timwindsor @astanley Any progess after having this open for 4 months now?

@timwindsor
Member

Well, so far we have been able to scan and parse out barcodes. So the most critical part is working at least in our rough prototype. The next major step is in giving the user some sort of visual feedback to aim the device. We've got a couple of strategies were looking at for the best experience and performance. I am really hoping to get it done in the next 2 weeks - maybe 3 for full polishing.

@mohunt
mohunt commented Mar 4, 2013

One of the limitations of ZXing is that it does not handle inverse (white-on-black) data matrix code. It would sure be nice if this effort would support inverse data matix codes (hint..hint...nudge...nudge).

@splatterb0y

@mohunt
Well it would be good to have atleast something before asking for specific things.

@lixam
lixam commented Mar 5, 2013

exactly what I thought! I have seen maybe a handful of white-on-black barcodes, so I think the basic scanning running would be a great start! Everything else is just on top of that!

@splatterb0y

I guess @timwindsor will give us an update on this one because 2 weeks passed now.

@timwindsor
Member

We've got a solution being reviewed for open sourcing right now.

@splatterb0y

AWESOME!!!!!

@timwindsor
Member

Landed

@timwindsor timwindsor closed this Apr 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment