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
Contributor
zaggaz
Posts: 16
Registered: ‎04-08-2011
My Device: Torch 9800
Accepted Solution

BlackBerry UPC Barcode Scanner

Hi all,

 

I'm currently trying to write an application to scan UPC Barcodes and return the barcode number. I am using the BlackBerry Plugin for Eclipse and I have an example of a QR barcode scanner which has the following code for decoding the barcode:

 

public ViewFinderScreen()

{

Hashtable hints = new Hashtable();

Vector formats = new Vector();

formats.addElement(BarcodeFormat.QR_CODE);

hints.put(DecodeHintType.POSSIBLE_FORMATS, formats);

hints.put(DecodeHintType.TRY_HARDER, Boolean.TRUE);

BarcodeDecoder decoder = new BarcodeDecoder(hints);

 

I've tried to change QR_CODE to UPC_A or UPC_E but neither work. What else would I need to do?

 

Any suggestions are welcome!

 

Thanks,

James

Developer
abhi007tyagi
Posts: 225
Registered: ‎09-29-2010
My Device: Limited Edition Z10, Playbook

Re: BlackBerry UPC Barcode Scanner

You can import the demo eg in eclipse and check that.

Its working for me

 

In Eclipse

Go to Files -> Import ->Import Blackberry Samples-> BarcodeScanDemo

 

You need to sign the application before deploying on device

 

Enjoy!!!

 

Abhinav Tyagi

Blackberry Z10-Limited Edition
Blackberry Playbook (won in free playbook offer)
My Apps : pAinT, HealthMeter, Shoot
New Member
Javitzso
Posts: 1
Registered: ‎04-19-2011
My Device: None

Re: BlackBerry UPC Barcode Scanner

In the sample, the barcode reader reads the barcode sideways.  Make sure the blackberry or the image (for the simulator) is turned.

Contributor
zaggaz
Posts: 16
Registered: ‎04-08-2011
My Device: Torch 9800

Re: BlackBerry UPC Barcode Scanner

what controls the direction that it's read?

New Contributor
kario
Posts: 7
Registered: ‎01-18-2013
My Device: 9900

Re: BlackBerry UPC Barcode Scanner

This upc barcode reader for Java gives a demo on how to build upc barcode scanner. it may help!

New Member
williamasd
Posts: 1
Registered: ‎04-28-2013
My Device: BlackBerry

Re: BlackBerry UPC Barcode Scanner

I am now using this java barcode reader to read UPC-A barcode. But the post is talking about read UPC barcode in BlackBerry!!! Can this be helpful? Anyone I have shared mine if this helps.

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: BlackBerry UPC Barcode Scanner

Can you show us a bit of a BlackBerry application that uses this and explain how you integrate this using Eclipse in a BlackBerry application?  I have have referred your documentation and I can't understand.