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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Contributor
Posts: 3
Registered: ‎12-02-2010
My Device: Not Specified

Re: barcode example not working

I am able using Torch simulator to test barcode examples. I am able to scan QR-codes, but unable to scan EAN-13 barcode. The lines are visible clearly. And I used the example EAN-13 barcode image of Wikipedia for testing. What may be the problem? Please help me to find the problem.





New Contributor
Posts: 3
Registered: ‎12-02-2010
My Device: Not Specified

Re: barcode example not working

Good morning,

I found the reason for my problem. The barcode api example app is working for EAN-13 when ever I tested the application in the device. So try to check the app in the device if you are unable to get the correct result in the simulator.





Posts: 16
Registered: ‎04-08-2011
My Device: Torch 9800
My Carrier: Vodaphone

Re: barcode example not working

Late post but hopefully it helps future developers:


You will need to modify the code because the "display" and "scan" buttons for the Torch are "touch screen" buttons.

Since the Bold's screen is just a screen, the display and scan buttons need to be converted into buttonfields, here's an example:


_mainScreen.setTitle("Barcode Scanner");

ButtonField scanButton = new ButtonField("Scan Barcode", ButtonField.CONSUME_CLICK | ButtonField.NEVER_DIRTY |


scanButton.setCommand(new Command(new CommandHandler() {

public void execute(ReadOnlyCommandMetadata arg0, Object arg1) {






Hope that helps,




New Contributor
Posts: 5
Registered: ‎05-04-2011
My Device: 9800
My Carrier: Telcel

Re: barcode example not working

I had problems too with the BarcodeScanDemo in the JDK 6.0... it worked fine in the simulator, but didn't work on a real Torch device.


But when I tried BarcodeAPISample in http://supportforums.blackberry.com/t5/Java-Development/How-to-use-the-Barcode-API/ta-p/574569  it worked fine in a Torch device and in the simulator.


(I only tested QR code scanning)

Posts: 1
Registered: ‎02-28-2012
My Device: 9300
My Carrier: airtel

Re: barcode example not working


      I tried to run qrcode scan application on blackberry curve os6 using blackberry api but its not working .

it is working fine for tourch. but i have to work on blackberry curve. i also want to know that  for scanning qr/bar code should device has autofocus camera?