Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for Android

MatrixScan Class Reference

Inherits ProcessFrameListener.

Public Member Functions

 MatrixScan (BarcodePicker picker, MatrixScanListener listener)
 
 MatrixScan (BarcodePicker picker, MatrixScanListener listener, Set< MatrixScanOverlay > overlays)
 
boolean isEnabled ()
 
void setEnabled (boolean enabled)
 
boolean isRecognizedOnly ()
 
void setRecognizedOnly (boolean recognizedOnly)
 
boolean isBeepOnNewCode ()
 
void setBeepOnNewCode (boolean beepOnNewCode)
 
void beep ()
 
void addOverlay (MatrixScanOverlay overlay)
 
void removeOverlay (MatrixScanOverlay overlay)
 
void removeAllAugmentations ()
 
void didProcess (byte[] imageBuffer, int width, int height, ScanSession session)
 

Detailed Description

An high-level abstraction of the Scandit Matrix Scan.

This class can be used to track multiple barcodes simultaneously and to draw multiple overlays on top of the detected barcodes.

Since
5.9.0

Constructor & Destructor Documentation

MatrixScan ( BarcodePicker  picker,
MatrixScanListener  listener 
)

MatrixScan constructor without any overlays.

Parameters
pickerUnderlying com.scandit.barcodepicker.BarcodePicker to be used by the MatrixScan.
listenerMatrixScanListener instance.
Since
5.9.0
MatrixScan ( BarcodePicker  picker,
MatrixScanListener  listener,
Set< MatrixScanOverlay overlays 
)

MatrixScan constructor.

Parameters
pickerUnderlying com.scandit.barcodepicker.BarcodePicker to be used by the MatrixScan.
listenerMatrixScanListener instance.
overlaysA set of MatrixScanOverlay objects.
Since
5.9.0

Member Function Documentation

boolean isEnabled ( )

Check if matrix scan is enabled.

Default is true.

Returns
Boolean stating whether matrix scan is enabled or not.
Since
5.9.0
void setEnabled ( boolean  enabled)

Enable/disable the matrix scan.

Parameters
enabledBoolean stating whether matrix scan should be enabled or not.
Since
5.9.0
boolean isRecognizedOnly ( )

If this methods returns true, then only recognized barcodes will be tracked by the matrix scan.

Default is true.

Returns
Boolean stating whether only recognized barcodes are being tracked by the matrix scan.
Since
5.9.0
void setRecognizedOnly ( boolean  recognizedOnly)

Select whether all or only recognized barcodes will be tracked by the matrix scan.

Parameters
recognizedOnlyBoolean stating whether all or only recognized barcodes should be tracked.
Since
5.9.0
boolean isBeepOnNewCode ( )

If this methods returns true, then whenever a new code is recognized a beep will be played.

Default is false.

Returns
Boolean stating whether a beep will be played once a new code is recognized.
Since
5.9.0
void setBeepOnNewCode ( boolean  beepOnNewCode)

Set to true to beep whenever a new code is recognized.

Parameters
beepOnNewCodeBoolean stating whether a beep should be played.
Since
5.9.0
void beep ( )

Programmatically trigger a beep sound.

Since
5.9.0
void addOverlay ( MatrixScanOverlay  overlay)

Add a MatrixScanOverlay to be drawn by the MatrixScan.

Parameters
overlayInstance of MatrixScanOverlay class to be added to the MatrixScan.
Since
5.9.0
void removeOverlay ( MatrixScanOverlay  overlay)

Remove the given MatrixScanOverlay.

Parameters
overlayInstance of MatrixScanOverlay class to be removed from the MatrixScan.
Since
5.9.0
void removeAllAugmentations ( )

Remove all augmentations of every overlay belonging to the MatrixScan object.

This method will call the MatrixScanOverlay.removeAllAugmentations method on every overlay belonging to the MatrixScan object.

Since
5.9.0
void didProcess ( byte[]  imageBuffer,
int  width,
int  height,
ScanSession  session 
)

Invoked every time a frame has been processed by the barcode recognition engine.

In contrast to com.scandit.barcodepicker.OnScanListener.didScan, the didProcess callback is invoked after every frame, regardless whether a code could be successfully decoded or not. If your are only interested in fully decoded codes, use the com.scandit.barcodepicker.OnScanListener instead.

The didProcess callback is invoked in the thread that runs the recognition engine and blocks further processing. In case codes have been recognized in the same frame, the ProcessFrameListener.didProcess callback is invoked after com.scandit.barcodepicker.OnScanListener.didScan.

Parameters
imageBufferthe raw image data that was processed in NV21 format
widthwidth of the image buffer in pixels
heightheight of the image buffer in pixels
sessioncontains information on the current recognition process. It is only valid to access the scan session from within the callback. If part of the information is required outside the callback it must be copied first.
Since
4.9.0

Implements ProcessFrameListener.


The documentation for this class was generated from the following file:
  • MatrixScan.java