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

Inherits RelativeLayout, ScanditSDK, and SbCameraListener.

Inherited by LegacyPortraitScanditSDKBarcodePicker, and ScanditSDKAutoAdjustingBarcodePicker.

Public Member Functions

 ScanditSDKBarcodePicker (Context context, String appKey)
 
 ScanditSDKBarcodePicker (Context context, Class<?> rawClass, String appKey)
 
 ScanditSDKBarcodePicker (Context context, Class<?> rawClass, String appKey, int cameraFacingPreference)
 
 ScanditSDKBarcodePicker (Context context, Class<?> rawClass, String appKey, int cameraFacingPreference, WorkingRange workingRange)
 
 ScanditSDKBarcodePicker (Context context, String appKey, int cameraFacingPreference)
 
 ScanditSDKBarcodePicker (Context context, String appKey, int cameraFacingPreference, WorkingRange workingRange)
 
 ScanditSDKBarcodePicker (Context context, String appKey, ScanditSDKScanSettings settings)
 
void addOnScanListener (ScanditSDKOnScanListener listener)
 
ScanditSDKOverlay getOverlayView ()
 
void setCaptureListener (ScanditSDKCaptureListener listener)
 
boolean isScanning ()
 
void startScanning (ScanditSDKScanSettings settings)
 
void startScanning ()
 
void addProcessingListener (ScanditSDKProcessingListener listener)
 
void stopScanning ()
 
void pauseScanning ()
 
void resumeScanning ()
 
void reset ()
 
void setDeviceName (String deviceName)
 
void set1DScanningEnabled (boolean enabled)
 
void set2DScanningEnabled (boolean enabled)
 
void setEan13AndUpc12Enabled (boolean enabled)
 
void setEan8Enabled (boolean enabled)
 
void setUpceEnabled (boolean enabled)
 
void setCode39Enabled (boolean enabled)
 
void setCode93Enabled (boolean enabled)
 
void setCode11Enabled (boolean enabled)
 
void setCode128Enabled (boolean enabled)
 
void setCode25Enabled (boolean enabled)
 
void setItfEnabled (boolean enabled)
 
void setQrEnabled (boolean enabled)
 
void setDataMatrixEnabled (boolean enabled)
 
void setPdf417Enabled (boolean enabled)
 
void setMicroPdf417Enabled (boolean enabled)
 
void setMsiPlesseyEnabled (boolean enabled)
 
void setMsiPlesseyChecksumType (int checksumType)
 
void setGS1DataBarEnabled (boolean enabled)
 
void setGS1DataBarExpandedEnabled (boolean enabled)
 
void setGS1DataBarLimitedEnabled (boolean enabled)
 
void setCodabarEnabled (boolean enabled)
 
void setAztecEnabled (boolean enabled)
 
void setMaxiCodeEnabled (boolean enabled)
 
void setTwoDigitAddOnEnabled (boolean enabled)
 
void setFiveDigitAddOnEnabled (boolean enabled)
 
void setInverseRecognitionEnabled (boolean enabled)
 
void setMicroDataMatrixEnabled (boolean enabled)
 
void force2dRecognition (boolean force)
 
void restrictActiveScanningArea (boolean restrict)
 
void switchTorchOn (boolean on)
 
boolean supportsCameraFacing (int cameraFacingPreference)
 
boolean changeCameraFacing (int cameraFacingPreference)
 
boolean switchCameraFacing ()
 
int getCameraFacingDirection ()
 
void setScanningHotSpot (float x, float y)
 
void setScanningHotSpotHeight (float height)
 
void setWorkingRange (WorkingRange range)
 
void setZoom (float zoomPercentage)
 
void setActiveScanningArea (int orientation, RectF rect)
 
void setZoom (int zoom)
 
void setMaxNumCodesPerFrame (int num)
 
void ignorePreviewAspectRatio ()
 
byte[] getMostRecentCameraPreviewImage ()
 
byte[] getCameraPreviewImageOfFirstBarcodeRecognition ()
 
int getCameraPreviewImageWidth ()
 
int getCameraPreviewImageHeight ()
 
void setProperty (String name, Object value)
 
Object getProperty (String name)
 

Static Public Member Functions

static boolean canRunPortraitPicker ()
 

Public Attributes

int CAMERA_FACING_BACK
 
int CAMERA_FACING_FRONT
 
int CHECKSUM_NONE
 
int CHECKSUM_MOD_10
 
int ORIENTATION_LANDSCAPE
 
int ORIENTATION_PORTRAIT
 

Protected Member Functions

 ScanditSDKBarcodePicker (Context context, String appKey, ScanditSDKScanSettings settings, boolean legacy)
 

Detailed Description

The main interface for scanning barcodes with the Scandit SDK.

This class sets up the recognition process, the preview view, controls the camera and provides a callback interface when barcodes are recognized.

The picker class is a able to run in full-screen or as a subview in an existing activity.

Author
Moritz Hartmeier, Marco Biasini

Constructor & Destructor Documentation

ScanditSDKBarcodePicker ( Context  context,
String  appKey 
)

Initializes the barcode picker.

To enable the analytics and location capabilities of the Scandit SDK, set the parameters accordingly. The app key is mandatory and is available via the Scandit SDK website.

Parameters
contextA context.
appKeyThe Scandit SDK app key.
ScanditSDKBarcodePicker ( Context  context,
Class<?>  rawClass,
String  appKey 
)

Initializes the barcode picker.

To enable the analytics and location capabilities of the Scandit SDK, set the parameters accordingly. The app key is mandatory and is available via the Scandit SDK website.

Parameters
contextA context.
rawClassR.raw needs to be passed to the ScanDKBarcodePicker to load resources for the ScanDKBarcodePicker.
appKeyThe Scandit SDK app key.
ScanditSDKBarcodePicker ( Context  context,
Class<?>  rawClass,
String  appKey,
int  cameraFacingPreference 
)

Initializes the barcode picker.

To enable the analytics and location capabilities of the Scandit SDK, set the parameters accordingly. The app key is mandatory and is available via the Scandit SDK website.

Parameters
contextA context.
rawClassR.raw needs to be passed to the ScanDKBarcodePicker to load resources for the ScanDKBarcodePicker.
appKeyThe Scandit SDK app key.
cameraFacingPreferenceWhich camera should be used assuming there is more than one available. Either CAMERA_FACING_BACK or CAMERA_FACING_FRONT
ScanditSDKBarcodePicker ( Context  context,
Class<?>  rawClass,
String  appKey,
int  cameraFacingPreference,
WorkingRange  workingRange 
)

Initializes the barcode picker.

To enable the analytics and location capabilities of the Scandit SDK, set the parameters accordingly. The app key is mandatory and is available via the Scandit SDK website.

Parameters
contextA context.
rawClassR.raw needs to be passed to the ScanDKBarcodePicker to load resources for the ScanDKBarcodePicker.
appKeyThe Scandit SDK app key.
cameraFacingPreferenceWhich camera should be used assuming there is more than one available. Either CAMERA_FACING_BACK or CAMERA_FACING_FRONT
workingRangethe focus working range for the camera
ScanditSDKBarcodePicker ( Context  context,
String  appKey,
int  cameraFacingPreference 
)

Initializes the barcode picker.

To enable the analytics and location capabilities of the Scandit SDK, set the parameters accordingly. The app key is mandatory and is available via the Scandit SDK website.

Parameters
contextA context.
appKeyThe Scandit SDK app key.
cameraFacingPreferenceWhich camera should be used assuming there is more than one available. Either CAMERA_FACING_BACK or CAMERA_FACING_FRONT
ScanditSDKBarcodePicker ( Context  context,
String  appKey,
int  cameraFacingPreference,
WorkingRange  workingRange 
)

Initializes the barcode picker.

To enable the analytics and location capabilities of the Scandit SDK, set the parameters accordingly. The app key is mandatory and is available via the Scandit SDK website.

Parameters
contextA context.
appKeyThe Scandit SDK app key.
cameraFacingPreferenceWhich camera should be used assuming there is more than one available. Either CAMERA_FACING_BACK or CAMERA_FACING_FRONT
workingRangeThe focus working range for the camera
ScanditSDKBarcodePicker ( Context  context,
String  appKey,
ScanditSDKScanSettings  settings 
)

Initializes the barcode picker.

To enable the analytics and location capabilities of the Scandit SDK, set the parameters accordingly. The app key is mandatory and is available via the Scandit SDK website.

Parameters
contextA context.
appKeyThe Scandit SDK app key.
settingsthe scan settings to use
Since
4.3
ScanditSDKBarcodePicker ( Context  context,
String  appKey,
ScanditSDKScanSettings  settings,
boolean  legacy 
)
protected

Initializes the barcode picker.

To enable the analytics and location capabilities of the Scandit SDK, set the parameters accordingly. The app key is mandatory and is available via the Scandit SDK website.

Parameters
contextA context.
appKeyThe Scandit SDK app key.
settingsThe settings to use for scanning
legacyWhether the picker is used in legacy mode.

Member Function Documentation

static boolean canRunPortraitPicker ( )
static
Returns
true if the ScanditSDKBarcodePicker can be used in portrait scanning mode. If the method returns false (on all Android 2.1 devices and a few, selected Android 2.2 devices), use the ScanditSDKBarcodePicker in landscape mode or alternatively the LegacyPortraitScanditSDKBarcodePicker.
void addOnScanListener ( ScanditSDKOnScanListener  listener)

Add a listener for barcode recognition events.

If the listener is null, or has already been added it is not added to the list of listeners.

Parameters
listenerthe listener to be added

Implements ScanditSDK.

ScanditSDKOverlay getOverlayView ( )

Returns the overlay view.

Use this method to access the com.mirasense.scanditsdk.interfaces.ScanditSDKOverlay and customize the scan UI. See com.mirasense.scanditsdk.interfaces.ScanditSDKOverlay for all the available options.

Returns
The overlay view on top of the camera feed. This view is always a RelativeLayout.

Implements ScanditSDK.

void setCaptureListener ( ScanditSDKCaptureListener  listener)

Sets a listener object for capture events.

Parameters
listenerThe listener.

Implements ScanditSDK.

boolean isScanning ( )

Returns true if scanning is in progress.

Since
1.0.0
Returns
Whether scanning is in progress.

Implements ScanditSDK.

void startScanning ( ScanditSDKScanSettings  settings)

Starts the scanning process with the provided settings.

This method exists for scenarios when the scan settings change between different scan session. When your scan settings are fixed, it is recommended to set the scan settings when initializing the picker and use startScanning() instead.

Since
4.4
Parameters
settingssettings to use.

Implements ScanditSDK.

void startScanning ( )

Starts the scanning process.

This locks the device's camera and gives you the responsibility to unlock the camera again with ScanditSDK.stopScanning(). The way Android handles the camera lock you will need to unlock it at the latest when your Activity loses focus (in Activity.onPause()) to not cause problems for other apps.

See also
ScanditSDK.stopScanning()
Since
1.0.0

Implements ScanditSDK.

void addProcessingListener ( ScanditSDKProcessingListener  listener)

Add a listener for notifications after a frame has been processed.

If the listener is null, or has already been added it is not added to the list of listeners.

Since
4.5.0
Parameters
listenerthe listener to be added

Implements ScanditSDK.

void stopScanning ( )

Stops the scanning process.

This unlocks the device's camera if it was previously locked by ScanditSDK.startScanning().

See also
ScanditSDK.startScanning()
Since
1.0.0

Implements ScanditSDK.

void pauseScanning ( )

Pauses scanning while keeping the camera feed running.

Implements ScanditSDK.

void resumeScanning ( )

Resume scanning after pauseScanning() was called.

Implements ScanditSDK.

void reset ( )

Resets the barcode scanner state.

Can be used if a code has been recognized, the user is still close to the code, and the code should be recognized again, e.g. after the user pressed a button.

Since
1.0.0

Implements ScanditSDK.

void setDeviceName ( String  deviceName)

Sets the device name to identify the current device when looking at analytics tools.

Sends a request to the server to set this as soon as a connection is available.

Parameters
deviceNameA device name.

Implements ScanditSDK.

void set1DScanningEnabled ( boolean  enabled)

Enables or disables the recognition of all 1D barcode symbologies supported by the particular Scandit SDK edition you are using.

By default all 1D symbologies except for MSI Plessey and GS1 DataBar are enabled.

Since
1.0.0
Parameters
enabledWhether all 1D symbologies should be enabled.

Implements ScanditSDK.

void set2DScanningEnabled ( boolean  enabled)

Enables or disables the recognition of 2D barcode symbologies supported by the particular Scandit SDK edition you are using.

By default only QR is enabled.

Since
1.0.0
Parameters
enabledboolean indicating whether all 2D symbologies are enabled

Implements ScanditSDK.

void setEan13AndUpc12Enabled ( boolean  enabled)

Enables or disables the barcode decoder for EAN13 and UPC12/UPCA codes.

By default scanning of EAN13 and UPC barcodes is enabled.

Since
1.0.0
Parameters
enabledboolean indicating whether this symbology should be enabled.

Implements ScanditSDK.

void setEan8Enabled ( boolean  enabled)

Enables or disables the barcode decoder for EAN8 codes.

By default scanning of EAN8 barcodes is enabled.

Since
1.0.0
Parameters
enabledboolean indicating whether this symbology should be enabled.

Implements ScanditSDK.

void setUpceEnabled ( boolean  enabled)

Enables or disables the barcode decoder for UPCE codes.

By default scanning of UPCE barcodes is enabled.

Since
1.0.0
Parameters
enabledWhether this symbology should be enabled.

Implements ScanditSDK.

void setCode39Enabled ( boolean  enabled)

Enables or disables the barcode decoder for Code39 codes.

By default scanning of Code39 barcodes is enabled. Note: CODE39 scanning is only available with the Professional and Enterprise Packages.

Since
1.0.0
Parameters
enabledWhether this symbology should be enabled.

Implements ScanditSDK.

void setCode93Enabled ( boolean  enabled)

Enables or disables the barcode decoder for Code93 codes.

By default scanning of Code93 barcodes is disabled. Note: CODE93 scanning is only available with the Professional and Enterprise Packages.

Since
4.1.0
Parameters
enabledWhether this symbology should be enabled.

Implements ScanditSDK.

void setCode11Enabled ( boolean  enabled)

Enables or disables the barcode decoder for Code11 codes.

By default scanning of Code11 barcodes is disabled. Note: CODE11 scanning is only available with the Professional and Enterprise Packages.

Since
4.9.0
Parameters
enabledWhether this symbology should be enabled.

Implements ScanditSDK.

void setCode128Enabled ( boolean  enabled)

Enables or disables the barcode decoder for Code128 codes.

By default scanning of Code128 barcodes is enabled. Note: CODE128 scanning is only available with the Professional and Enterprise Packages.

Since
1.0.0
Parameters
enabledWhether this symbology should be enabled.

Implements ScanditSDK.

void setCode25Enabled ( boolean  enabled)

Enables or disables the barcode decoder for Code25 (Standard or Industrial 2 out of 5) codes.

By default scanning of Code25 barcodes is disabled. Note: CODE25 scanning is only available with the Professional and Enterprise Packages.

Since
4.13.0
Parameters
enabledWhether this symbology should be enabled.

Implements ScanditSDK.

void setItfEnabled ( boolean  enabled)

Enables or disables the barcode decoder for ITF (Interleaved 2 out of 5) codes.

By default scanning of ITF barcodes is enabled. Note: ITF scanning is only available with the Professional and Enterprise Packages.

Since
1.0.0
Parameters
enabledWhether this symbology should be enabled.

Implements ScanditSDK.

void setQrEnabled ( boolean  enabled)

Enables or disables the barcode decoder for QR codes.

By default scanning of QR barcodes is enabled.

Since
2.0.0
Parameters
enabledWhether this symbology should be enabled.

Implements ScanditSDK.

void setDataMatrixEnabled ( boolean  enabled)

Enables or disables the barcode decoder for Datamatrix codes.

By default scanning of Datamatrix codes is enabled.

Note: Datamatrix scanning is only available with the Professional and Enterprise Packages.

Since
2.0.0
Parameters
enabledWhether this symbology should be enabled.

Implements ScanditSDK.

void setPdf417Enabled ( boolean  enabled)

Enables or disables the recognition of PDF417 codes.

By default scanning of PDF417 codes is disabled.

Note: PDF417 scanning is only available with the Professional and Enterprise Packages.

Since
4.0.0
Parameters
enabledWhether this symbology should be enabled.

Implements ScanditSDK.

void setMicroPdf417Enabled ( boolean  enabled)

Enables or disables the recognition of MicroPDF417 codes.

By default scanning of MicroPDF417 codes is disabled.

Note: PDF417 scanning is only available with the Professional and Enterprise Packages.

Since
4.14.0
Parameters
enabledWhether this symbology should be enabled.

Implements ScanditSDK.

void setMsiPlesseyEnabled ( boolean  enabled)

Enables or disables the barcode decoder for MSI Plessey codes.

By default scanning of MSI Plessey barcodes is disabled. Note: MSI Plessey scanning is only available with the Professional and Enterprise Packages.

Since
3.2.0
Parameters
enabledWhether this symbology should be enabled.

Implements ScanditSDK.

void setMsiPlesseyChecksumType ( int  checksumType)

Sets the type of checksum that is expected of the MSI Plessey codes.

MSI Plessey is used with different checksums. Set the checksum your application uses with this method.

By default it is set to CHECKSUM_MOD_10.

Since
3.2.0
Parameters
checksumTypeThe MSIPlesseyChecksumType your application uses.

Implements ScanditSDK.

void setGS1DataBarEnabled ( boolean  enabled)

Enables or disables the recognition of DataBar codes.

By default scanning of GS1 Databar barcodes is disabled. Note: GS1 Databar scanning is only available with the Professional and Enterprise Packages.

Since
4.1.0
Parameters
enabledWhether it should be enabled. Default is false.

Implements ScanditSDK.

void setGS1DataBarExpandedEnabled ( boolean  enabled)

Enables or disables the recognition of DataBar Expanded codes.

By default scanning of GS1 Databar Expanded barcodes is disabled. Note: GS1 Databar scanning is only available with the Professional and Enterprise Packages.

Since
4.1.0
Parameters
enabledWhether it should be enabled. Default is false.

Implements ScanditSDK.

void setGS1DataBarLimitedEnabled ( boolean  enabled)

Enables or disables the recognition of DataBar Limited codes.

By default scanning of GS1 Databar Limited barcodes is disabled. Note: GS1 Databar scanning is only available with the Professional and Enterprise Packages.

Since
4.11.0
Parameters
enabledWhether it should be enabled. Default is false.

Implements ScanditSDK.

void setCodabarEnabled ( boolean  enabled)

Enables or disables the recognition of Codabar codes.

By default scanning of Codabar barcodes is disabled. Note: Codabar scanning is only available with the Professional and Enterprise Packages.

Since
4.1.0
Parameters
enabledWhether it should be enabled. Default is false.

Implements ScanditSDK.

void setAztecEnabled ( boolean  enabled)

Enables or disables the recognition of Aztec codes.

By default scanning of Aztec codes is disabled.

Note: Aztec scanning is only available with the Professional and Enterprise Packages.

Since
4.3.0
Parameters
enabledWhether it should be enabled. Default is false.

Implements ScanditSDK.

void setMaxiCodeEnabled ( boolean  enabled)

Enables or disables the recognition of MaxiCodes.

By default scanning of MaxiCodes is disabled.

Note: MaxiCode scanning is only available with the Professional and Enterprise Packages.

Since
4.9.0
Parameters
enabledWhether it should be enabled. Default is false.

Implements ScanditSDK.

void setTwoDigitAddOnEnabled ( boolean  enabled)

Enables or disables the recognition of two-digit add-ons for EAN and UPC barcodes.

Note that you also need to enable scanning of EAN13/UPCA, EAN8, or UPCE codes in order to scan two-digit add-ons and must set the maximum number of codes per frame to at least 2.

Since
4.5.0
Parameters
enabledWhether it should be enabled. Default is false.

Implements ScanditSDK.

void setFiveDigitAddOnEnabled ( boolean  enabled)

Enables or disables the recognition of five-digit add-ons for EAN and UPC barcodes.

Note that you also need to enable scanning of EAN13/UPCA, EAN8, or UPCE codes in order to scan five-digit add-ons and must set the maximum number of codes per frame to at least 2.

Since
4.5.0
Parameters
enabledWhether it should be enabled. Default is false.

Implements ScanditSDK.

void setInverseRecognitionEnabled ( boolean  enabled)

Enables the detection of white on black codes.

This option currently only works for Data Matrix and QR codes.

By default this mode is disabled.

Since
3.0.0
Parameters
enabledWhether this mode should be enabled.

Implements ScanditSDK.

void setMicroDataMatrixEnabled ( boolean  enabled)

Enable the detection/decoding of tiny Data Matrix codes.

When this mode is enabled, a dedicated localization algorithm is activated that searches for small Datamatrix codes in the central part of the camera image. This algorithm requires additional resources and slows down the recognition of other barcode symbologies. We recommend using the method only when your application requires the decoding of tiny Datamatrix codes.

By default this mode is disabled.

Since
3.0.0
Parameters
enabledWhether this mode should be enabled.

Implements ScanditSDK.

void force2dRecognition ( boolean  force)

Forces the barcode scanner to always run the 2D decoders (QR, Datamatrix, etc.), even when the 2D detector did not detect the presence of a 2D code.

This slows down the overall scanning speed, but can be useful when your application only tries to read QR codes. It is by default enabled when the micro Datamatrix mode is enabled.

By default, this is disabled.

Parameters
forceboolean indicating whether this mode should be enabled.
Since
2.0.0

Implements ScanditSDK.

void restrictActiveScanningArea ( boolean  restrict)

Reduces the area in which barcodes are detected and decoded.

When activated, the active scanning area is defined by setScanningHotSpotHeight(float) and setScanningHotSpot(float, float)

Parameters
restrict

Implements ScanditSDK.

void switchTorchOn ( boolean  on)

Switches the torch on or off.

If the torch button is enabled on the overlay, users can change this by clicking it.

Since
2.0.0
Parameters
onWhether the torch should be on.

Implements ScanditSDK.

boolean supportsCameraFacing ( int  cameraFacingPreference)

Returns whether the specified camera facing direction is supported by the current device.

Since
3.0.0
Parameters
cameraFacingPreferenceThe camera facing direction in question.
Returns
Whether the camera facing direction is supported

Implements ScanditSDK.

boolean changeCameraFacing ( int  cameraFacingPreference)

Changes to the specified camera facing direction if it is supported.

The legacy picker will never switch away from the default camera.

Since
3.0.0
Parameters
cameraFacingPreferenceThe new camera facing direction.
Returns
Whether the change was successful.

Implements ScanditSDK.

boolean switchCameraFacing ( )

Changes to the opposite camera facing if it is supported.

The legacy picker will never switch away from the default camera.

Since
3.0.0
Returns
Whether the change was successful

Implements ScanditSDK.

int getCameraFacingDirection ( )

Returns which direction the currently shown camera is facing.

Since
3.0.0
Returns
Which way the camera faces, either CAMERA_FACING_BACK or CAMERA_FACING_FRONT.

Implements ScanditSDK.

void setScanningHotSpot ( float  x,
float  y 
)

Sets the location in the image where barcodes are decoded with the highest priority.

This method shows a slightly different behavior depending on whether the full screen scanning is active or not. In Full screen scanning mode:

Sets the location in the image which is decoded with the highest priority when multiple barcodes are present in the image.

In restrictActiveScanningArea mode (activated with restrictActiveScanningArea(boolean)):

Changes the location of the spot where the barcode decoder actively scans for barcodes.

X and Y can be between 0 and 1, where 0/0 corresponds to the top left corner and 1/1 to the bottom right corner.

The default hotspot is set to 0.5/0.5

See also
ScanditSDKBarcodePicker.restrictActiveScanningArea(boolean)
ScanditSDKBarcodePicker.setScanningHotSpotHeight(float)
Since
1.0.0
Parameters
xThe hotspot's relative x coordinate.
yThe hotspot's relative y coordinate.

Implements ScanditSDK.

void setScanningHotSpotHeight ( float  height)

Changes the height of the area where barcodes are decoded in the camera image when restrictActiveScanningArea is activated.

The height of the active scanning area is relative to the height of the screen and has to be between 0.0 and 0.5.

This only applies if the active scanning area is restricted.

The default is 0.25

See also
ScanditSDKBarcodePicker.restrictActiveScanningArea(boolean)
ScanditSDKBarcodePicker.setScanningHotSpot(float, float)
Since
1.0.0
Parameters
heightThe relative height of the active scanning area.

Implements ScanditSDK.

void setWorkingRange ( WorkingRange  range)

Sets the focus working range for the barcode picker.

The working range tells the engine at which distance barcodes are to be expected. When set to STANDARD_RANGE (the default), the focus is optimized for barcodes close to the camera. When set to LONG_RANGE, the focus is optimized for far-away codes.

When using non-standard working range, it is better to directly pass the working range when constructing the barcode picker, because the camera can already start to adjust the focus at an earlier point in time.

See com.mirasense.scanditsdk.interfaces.ScanditSDK.WorkingRange for a list of possible values.

The working range hint is ignored on cameras with fixed-focus.

Since
4.1.0
Parameters
rangethe working range

Implements ScanditSDK.

void setZoom ( float  zoomPercentage)

Sets the zoom to the given percentage of the max zoom possible.

Parameters
zoomPercentageThe percentage of the max zoom (between 0 and 1).

Implements ScanditSDK.

void setActiveScanningArea ( int  orientation,
RectF  rect 
)

Sets the active scan area for either portrait mode scanning.

By default, the ScanditSDK searches the whole image for a barcode. Use this method to define the area in which barcodes are to be searched. Rectangle coordinates run from 0 to 1.

Calling this method will automatically enable restricted active area scanning (restrictActiveScanningArea(boolean)).

Since
4.4
Parameters
orientationthe device orientation for which to set the scan area. Must be either ORIENTATION_LANDSCAPE for landscape orientations (landscape-right and landscape-left), or ORIENTATION_PORTRAIT for portrait orientations. Calling this method with other orientation parameters is a no-op.
rectthe new active scan area. The coordinates (top, left, right, bottom) are defined as seen by the user.

Invoking this method with invalid rectangles, e.g. rectangles whose top, left, right, or bottom attributes are outside the allowed range of 0.0-1.0, or rectangles with negative width/height will have no effect.

Implements ScanditSDK.

void setZoom ( int  zoom)

Sets the zoom level as defined by the Android Camera.

Parameters
zoomZoom level (0 to max zoom)

Implements ScanditSDK.

void setMaxNumCodesPerFrame ( int  num)

Set the maximum number of codes to be decoded per frame.

By default at most one code is decoded per frame. Use this method to enable scanning multiple codes.

Since
4.5.0
Parameters
numthe new maximum number of codes to be decoded per frame. Values are clamped to the range 1...6.

Implements ScanditSDK.

void ignorePreviewAspectRatio ( )

Normally the picker adjusts to the aspect ratio of the preview image.

If this is called, it will no longer do this. Warning: If the aspect ratio is not kept, the camera feed may be stretched and no longer be a proper representation of what is recorded.

Implements ScanditSDK.

byte [] getMostRecentCameraPreviewImage ( )

Returns the last image returned by the Camera.

(The image will be "landscape" oriented. It's dimensions can be accessed using getCameraPreviewImageWidth() and getCameraPreviewImageHeight().)

Since
1.0.0
Returns
Byte array containing the image information in the NV21 format (YCrCb format, which uses the NV21 encoding format) or null, in case no preview image has been obtained so far

Implements ScanditSDK.

byte [] getCameraPreviewImageOfFirstBarcodeRecognition ( )

Returns the image in which the bar code has been recognized for the first time.

The image will be "landscape" oriented. It's dimensions can be accessed using getCameraPreviewImageWidth() and getCameraPreviewImageHeight().

Since
1.0.0
Returns
Byte array containing the image information in the NV21 format (YCrCb format, which uses the NV21 encoding format), or null, in case no barcode has been recognized since the recognition start or the last call of reset().

Implements ScanditSDK.

int getCameraPreviewImageWidth ( )

Returns the width of the preview images from the active camera.

Since
1.0.0
Returns
Preview image width.

Implements ScanditSDK.

int getCameraPreviewImageHeight ( )

Returns the height of the preview images from the active camera.

Since
1.0.0
Returns
Preview image height.

Implements ScanditSDK.

void setProperty ( String  name,
Object  value 
)

Sets a property.

This function is for internal use only and any functionality that can be accessed through it can and will vanish without public notice from one version to the next. Do not call this function unless you specifically have to.

Since
1.0.0
Parameters
nameThe property's name.
valueThe property's value.

Implements ScanditSDK.

Object getProperty ( String  name)

Gets a property.

This function is for internal use only and any functionality that can be accessed through it can and will vanish without public notice from one version to the next. Do not call this function unless you specifically have to.

Since
1.0.0
Parameters
nameThe property's name.
Returns
The property's value.

Implements ScanditSDK.

Member Data Documentation

int CAMERA_FACING_BACK
inherited

Default camera orientation - facing away from user.

int CAMERA_FACING_FRONT
inherited

Camera facing towards user.

int CHECKSUM_NONE
inherited

No MSI Plessey checksum.

int CHECKSUM_MOD_10
inherited

Default MSI Plessey checksum.

int ORIENTATION_LANDSCAPE
inherited

Orientation is either landscape or landscapeReverse.

int ORIENTATION_PORTRAIT
inherited

Orientation is either portrait or portraitUpsideDown.


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