net.rim.device.api.barcodelib
Class BarcodeDecoder

java.lang.Object
  extended by net.rim.device.api.barcodelib.BarcodeDecoder

public class BarcodeDecoder
extends Object

A barcode decoder class that recognizes 1D and 2D barcodes. Supported formats are those that are supported by the included com.google.zxing library.

To ensure faster processing, you should always attempt to configure this decoder to only decode barcode types you wish to process. The following is an example on how to configure a BarcodeDecoder which is configured to scan for QR codes only.

 
 Hashtable hints = new Hashtable()
 Vector formats  = new Vector();
 formats.addElement(BarcodeFormat.QR_CODE);
 hints.put(DecodeHintType.POSSIBLE_FORMATS, formats);
 hints.put(DecoderHintType.TRY_HARDER, Boolean.TRUE);
 BarcodeDecoder decoder = new BarcodeDecoder(hints);
 

Since:
BlackBerry API 6.0.0

Constructor Summary
BarcodeDecoder()
          Creates an instance of a BarcodeDecoder equivalent to BarcodeDecoder(null).
BarcodeDecoder(Hashtable hints)
          Creates an instance of a BarcodeDecoder class which tries to decode barcodes given a Hashtable of hints on how to interpret the camera data.
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

BarcodeDecoder

public BarcodeDecoder()
Creates an instance of a BarcodeDecoder equivalent to BarcodeDecoder(null). It is strongly suggested that you configure your BarcodeDecoder to only decode barcode types you are expecting to process.

See Also:
MultiFormatReader
Since:
BlackBerry API 6.0.0

BarcodeDecoder

public BarcodeDecoder(Hashtable hints)
Creates an instance of a BarcodeDecoder class which tries to decode barcodes given a Hashtable of hints on how to interpret the camera data. This is equivalent to:
 MultiFormatReader reader = new MultiFormatReader();
 reader.setHints(hints);
 

See Also:
MultiFormatReader
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.