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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Contributor
LakshmiRambabu
Posts: 3
Registered: ‎12-02-2010

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.

 

 

Thanks,

LakshmiRambabu

Please use plain text.
New Contributor
LakshmiRambabu
Posts: 3
Registered: ‎12-02-2010

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.

 

 

Thanks,

LakshmiRambabu

Please use plain text.
Contributor
zaggaz
Posts: 16
Registered: ‎04-08-2011
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 |

Field.FIELD_HCENTER | Field.FIELD_VCENTER);

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

public void execute(ReadOnlyCommandMetadata arg0, Object arg1) {

scanBarcode();

}

}));

_mainScreen.add(scanButton);

 

Hope that helps,

 

James

 

Please use plain text.
New Contributor
gilojeda
Posts: 5
Registered: ‎05-04-2011
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)

Please use plain text.
Visitor
sudhanshuyadav
Posts: 1
Registered: ‎02-28-2012
My Carrier: airtel

Re: barcode example not working

hi,

      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?

Please use plain text.