Interface BarcodeScanner
-
- All Implemented Interfaces:
public interface BarcodeScannerScans bar codes and QR codes.
-
-
Method Summary
Modifier and Type Method Description abstract BarcodeScannerConfigurationcopyCurrentConfiguration()Returns a copy of the current configuration. abstract UnitsetConfiguration(BarcodeScannerConfiguration configuration)Sets the configuration for the barcode scanner. abstract UnitenableBarcodeScan(Boolean barcodeScanEnabled)abstract BarcodeScannerResultscanFromNv21(ByteArray nv21, Integer width, Integer height, Integer frameOrientation)Scan barcodes from the nv21 frame. abstract BarcodeScannerResultscanFromNv21(ByteArray nv21, Integer width, Integer height, Integer frameOrientation, Rect finderRect)Scan barcodes from the nv21 frame within the viewfinder rectangle. abstract BarcodeScannerResultscanFromJpeg(ByteArray jpeg, Integer frameOrientation)Scan barcodes from the jpeg image. abstract BarcodeScannerResultscanFromRgba(ByteArray img, Integer width, Integer height, Integer frameOrientation)Scan barcodes from the RGBA image. abstract BarcodeScannerResultscanFromBitmap(Bitmap bitmap, Integer frameOrientation)Scan barcodes from the bitmap. -
-
Method Detail
-
copyCurrentConfiguration
abstract BarcodeScannerConfiguration copyCurrentConfiguration()
Returns a copy of the current configuration.
-
setConfiguration
abstract Unit setConfiguration(BarcodeScannerConfiguration configuration)
Sets the configuration for the barcode scanner.
- Parameters:
configuration- The configuration to set.
-
enableBarcodeScan
abstract Unit enableBarcodeScan(Boolean barcodeScanEnabled)
- Parameters:
barcodeScanEnabled- iftruebarcode scanning will be enabled,false- will be disabled
-
scanFromNv21
abstract BarcodeScannerResult scanFromNv21(ByteArray nv21, Integer width, Integer height, Integer frameOrientation)
Scan barcodes from the nv21 frame.
For efficiency, reuse the same scanner object between scans. The barcode filters list is taken from the current configuration state.
- Parameters:
nv21- The YUV preview frame.width- The width of the preview frame.height- The height of the preview frame.frameOrientation- The frame orientation degrees.
-
scanFromNv21
abstract BarcodeScannerResult scanFromNv21(ByteArray nv21, Integer width, Integer height, Integer frameOrientation, Rect finderRect)
Scan barcodes from the nv21 frame within the viewfinder rectangle.
For efficiency, reuse the same scanner object between scans. The barcode filters list is taken from the current configuration state.
- Parameters:
nv21- The YUV preview frame.width- The width of the preview frame.height- The height of the preview frame.frameOrientation- The frame orientation degrees.finderRect- decode area
-
scanFromJpeg
abstract BarcodeScannerResult scanFromJpeg(ByteArray jpeg, Integer frameOrientation)
Scan barcodes from the jpeg image.
For efficiency, reuse the same scanner object between scans. The barcode filters list is taken from the current configuration state.
- Parameters:
jpeg- The jpeg to find barcodes.frameOrientation- The frame orientation degrees.
-
scanFromRgba
abstract BarcodeScannerResult scanFromRgba(ByteArray img, Integer width, Integer height, Integer frameOrientation)
Scan barcodes from the RGBA image.
For efficiency, reuse the same scanner object between scans. The barcode filters list is taken from the current configuration state.
- Parameters:
img- The byteArray with image to find barcodes.width- The width of the preview frame.height- The height of the preview frame.frameOrientation- The frame orientation degrees.
-
scanFromBitmap
abstract BarcodeScannerResult scanFromBitmap(Bitmap bitmap, Integer frameOrientation)
Scan barcodes from the bitmap.
For efficiency, reuse the same scanner object between scans. The barcode filters list is taken from the current configuration state.
- Parameters:
bitmap- The Bitmap to find barcodes.frameOrientation- The frame orientation degrees.
-
-
-
-