Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
ankur_kulkarni
Posts: 27
Registered: ‎08-04-2009
My Device: Not Specified

Re: Barcode reader SDK or library?

Hi,

So Has anybody got any success with barcode Readign using camera on BB?

Can someone please guide furhter how to use it?

New Developer
rodrifox
Posts: 35
Registered: ‎12-22-2009
My Device: Bold 9700

Re: Barcode reader SDK or library?

I know there's already some guidance in this thread but considering the dates and how fast these technologies are changing, I was wondering if any of you guys have any updated info (or whether there are any plans to include a barcode library within the rim sdk).

 

Thanks!

-------------
Rodrigo Bravo
http://www.wilkonit.com
New Developer
rodrifox
Posts: 35
Registered: ‎12-22-2009
My Device: Bold 9700

Re: Barcode reader SDK or library?

Just to update this thread- I'm currently using zxing as srowen suggested and it works pretty much ok with 1D and 2D barcodes. It could have some issues however, when the image is not "perfectly" clear; so maybe not really good for end users, even with advanced BlackBerry phones/cameras.

-------------
Rodrigo Bravo
http://www.wilkonit.com
Developer
peter_strange
Posts: 19,609
Registered: ‎07-14-2008
My Device: Not Specified

Re: Barcode reader SDK or library?

OS 6.0 is rumored to have this built in!  I will be interested to see it. 

Contributor
dpolonsky
Posts: 27
Registered: ‎10-02-2010
My Device: Not Specified

Re: Barcode reader SDK or library?

[ Edited ]

hi guys

this is an old post and i hope someone will see it.

I am trying to use zxing library on JDE 4.6 with no luck so far (packaging issues).

Can anyone assist me on that ?

thx

New Developer
rodrifox
Posts: 35
Registered: ‎12-22-2009
My Device: Bold 9700

Re: Barcode reader SDK or library?

@dpolonsky what kind of issues are you having with zxing? Does the code even compile or it's more a runtime issue? The library is not RIM specific so you have to do some manual tunning. Anyway, as I stated before, it's still difficult to find a real end-user scenario in which this can be applicable (at least with 4.x OS). The barcode capture / decoding takes some time and the pre-set camera focus options don't help when trying to get a "good picture". You'll find it often fails due to a bad barcode capture.

-------------
Rodrigo Bravo
http://www.wilkonit.com
Contributor
dpolonsky
Posts: 27
Registered: ‎10-02-2010
My Device: Not Specified

Re: Barcode reader SDK or library?

[ Edited ]

Hey rodrifox !

sorry for late replay, i was away for a while.

 

I didn't figure out how to use QR camera in my project yet.


So far I have created an empty project for QR camera

and filled it with relevant source code for RIM: Core, J2ME and Rim packages

The projects compiles OK, but when i try run it on simulator it fails 

 

"I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified"

 

indeed the jar is not there and probably it fails to create it, but why ?


Contributor
dpolonsky
Posts: 27
Registered: ‎10-02-2010
My Device: Not Specified

Re: Barcode reader SDK or library?

[ Edited ]


Another flow i have tried is adding the zxing jars to an empty project as external jars.

 

with a little tweak of removing of removing

MicroEdition-Profile- MIDP-2.0

 

 

 

from the manifest of BarcodeReader.jar

 

The application is running except for few uncaught exceptions in some flows, and in console I am getting this error

 

java.util.zip.ZipException: duplicate entry: BarcodeReader-1.cod
 
at java.util.zip.ZipOutputStream.putNextEntry(Unknown Source)
 at java.util.jar.JarOutputStream.putNextEntry(Unknown Source)
 at sun.tools.jar.Main.addFile(Unknown Source)
 at sun.tools.jar.Main.create(Unknown Source)
 at sun.tools.jar.Main.run(Unknown Source)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at net.rim.tools.compiler.c.e.if(Unknown Source)
 at net.rim.tools.compiler.c.e.a(Unknown Source)
 at net.rim.tools.compiler.Compiler.a(Unknown Source)
 at net.rim.tools.compiler.Compiler.a(Unknown Source)
 at net.rim.tools.compiler.Compiler.compile(Unknown Source)
 at net.rim.tools.compiler.Compiler.main(Unknown Source)
I/O Error: jar command failed: jar -cfm G:\Projects\BarcodeReader\deliverables\Standard\4.6.0\BarcodeReader.jar C:\Users\Daniel\AppData\Loc ...

Packaging project BarcodeReader failed (took 3.239 seconds) 
I/O Error: jar command failed: jar -cfm G:\Projects\BarcodeReader\deliverables\Standard\4.6.0\BarcodeReader.jar C:\Users\Daniel\AppData\Loc ...Packaging project BarcodeReader failed (took 3.239 seconds) 

 

 

 

while I have found only one instance of this jar in BarcodeReader.jar

New Developer
rodrifox
Posts: 35
Registered: ‎12-22-2009
My Device: Bold 9700

Re: Barcode reader SDK or library?

No need to reference an external jar... try to add the source code to the project, not an external jar. There might be a lot of classes and packages you actually don't need.

-------------
Rodrigo Bravo
http://www.wilkonit.com
Contributor
dpolonsky
Posts: 27
Registered: ‎10-02-2010
My Device: Not Specified

Re: Barcode reader SDK or library?

I have managed to add the zxing library, but it fails to resolve barcode images I am providing it :smileysad:

Maybe it is the low resolution I am using 

"encoding=jpeg&width=640&height=480&quality=normal"

when I am increasing the camera resolution the out of memory exception is thrown