scanditsdkView Class Reference

Inherits TiUIView.

Public Member Functions

void init ()
 
void init (String scanditSDKAppKey, int facing)
 
void setSize (int width, int height)
 
void setRecognitionMode (int recognitionMode)
 
void setScanSettingsProperty (String key, Object value)
 

Analytics Configuration

void setDeviceName (String deviceName)
 

Camera Selection

Select, choose or determine camera orientation

void changeCameraFacing (int facing)
 
void switchCameraFacing ()
 

Scanning Callbacks

Set callback functions for scan events

void setSuccessCallback (Function function)
 
void setCancelCallback (Function function)
 

Barcode Decoder Operation

Start and stop barcode decoder

void startScanning ()
 
void startScanning (boolean startInPausedState)
 
void pauseScanning ()
 
void resumeScanning ()
 
void stopScanning ()
 

Barcode Decoder Configuration and Symbology Selection

Configure which symbologies are decoded and adjust decoder parameters

void force2dRecognition
 
void set1DScanningEnabled (boolean enabled)
 
void set2DScanningEnabled (boolean enabled)
 
void setEan13AndUpc12Enabled (boolean enabled)
 
void setTwoDigitAddOnEnabled (boolean enabled)
 
void setFiveDigitAddOnEnabled (boolean enabled)
 
void setEan8Enabled (boolean enabled)
 
void setUpceEnabled (boolean enabled)
 
void setCode32Enabled (boolean enabled)
 
void setCode39Enabled (boolean enabled)
 
void setCode93Enabled (boolean enabled)
 
void setCode11Enabled (boolean enabled)
 
void setCode128Enabled (boolean enabled)
 
void setMicroPdf417Enabled (boolean enabled)
 
void setKIXEnabled (boolean enabled)
 
void setRM4SCCEnabled (boolean enabled)
 
void setPdf417Enabled (boolean enabled)
 
void setGS1DataBarEnabled (boolean enabled)
 
void setGS1DataBarExpandedEnabled (boolean enabled)
 
void setGS1DataBarLimitedEnabled (boolean enabled)
 
void setCode25Enabled (boolean enabled)
 
void setItfEnabled (boolean enabled)
 
void setMsiPlesseyEnabled (boolean enabled)
 
void setMsiPlesseyChecksumType (int checksumType)
 
void setMaxiCodeEnabled (boolean enabled)
 
void setQrEnabled (boolean enabled)
 
void setDataMatrixEnabled (boolean enabled)
 
void setDotCodeEnabled (boolean enabled)
 
void setInverseDetectionEnabled (boolean enabled)
 
void setCodeDuplicateFilter (int duration)
 
void restrictActiveScanningArea (boolean enabled)
 
void setScanningHotSpot (float x, float y)
 
void setScanningHotSpotHeight (float height)
 
void setRelativeZoom (float zoom)
 
void setHighDensityModeEnabled (boolean enabled)
 

Text Recognition

Set up text recognition

void setTextRecognitionCallback (Function function)
 
void setTextRecognitionSettings (Map< String, Object > settings)
 
void setRecognizedTextRejected (boolean rejected)
 

Torch Control

Control/configure torch

void switchTorchOn (boolean on)
 
void setTorchEnabled (boolean enabled)
 
void setTorchButtonMarginsAndSize (float leftMargin, float topMargin, float width, float height)
 

Sound Configuration

Customize the scan sound.

void setBeepEnabled (boolean enabled)
 
void setVibrateEnabled (boolean enabled)
 

Camera Switch Configuration

Enable camera switch and set icons

void setCameraSwitchVisibility (int visibility)
 
void setCameraSwitchButtonMarginsAndSize (float rightMargin, float topMargin, float width, float height)
 

Viewfinder Configuration

Customize the viewfinder where the barcode location is highlighted.

void setViewfinderSize (float width, float height, float landscapeWidth, float landscapeHeight)
 
void drawViewfinder (boolean draw)
 
void setViewfinderColor (float r, float g, float b)
 
void setViewfinderDecodedColor (float r, float g, float b)
 

Toolbar Configuration

Customize toolbar appearance

void showToolBar (boolean show)
 
void setToolBarButtonCaption (String caption)
 

Searchbar Configuration

Customize searchbar appearance

void showSearchBar (boolean show)
 
void setSearchBarActionButtonCaption (String caption)
 
void setSearchBarCancelButtonCaption (String caption)
 
void setSearchBarPlaceholderText (String text)
 
void setMinSearchBarBarcodeLength (int length)
 
void setMaxSearchBarBarcodeLength (int length)
 

Detailed Description

The availability of a symbology depends on your license and contract.

For example, community licenses only include UPCA, EAN13, EAN8, UPCE and QR. View of the ScanditSDK module displaying the camera feed, decoding barcodes and updating the UI accordingly. Create this view through scanditsdk.createView().

Since
1.0.0

Minimal example to set up the barcode picker and start scanning.

// Load the Scandit SDK module.
var scanditsdk = require("com.mirasense.scanditsdk");
// First set the app key and which direction the camera should face.
scanditsdk.appKey = "-- ENTER YOUR SCANDIT LICENSE KEY HERE --";
scanditsdk.cameraFacingPreference = 0; // Back camera
// Instantiate the Scandit SDK Barcode Picker view.
var picker = scanditsdk.createView({
width:"100%",
height:"100%"
});
// Initialize the barcode picker.
picker.init();
// Set callback functions for when scanning succeedes and for when the scanning is canceled.
// This callback is called on the scan engine's thread to allow you to synchronously call
// stopScanning or pauseScanning. Any UI specific calls from within this function have to be
// issued through setTimeout to switch to the UI thread first.
picker.setSuccessCallback(function(e) {
alert("success (" + e.symbology + "): " + e.barcode);
});
// startScanning() has to be called after the window is opened.
picker.startScanning();

Member Function Documentation

void init ( )

Initializes the barcode picker.

This has to be called after scanditsdk.createView but before anything else is called on the picker object. Make sure that you have set the appKey property before calling this.

Since
4.4.3
void init ( String  scanditSDKAppKey,
int  facing 
)

Initializes the barcode picker with the desired camera orientation.

Since
1.0.0
Parameters
scanditSDKAppKeyyour Scandit SDK App Key (available from your Scandit account)
facingthe desired camera facing direction (0 for backward (default) camera, 1 for front camera)
void setSize ( int  width,
int  height 
)

Sets the size of the camera preview in the app.

In normal cases you should set the width and height properties of the view to scale and/or crop, however, there are cases like when this picker is added as the cell of a listview where it will not be properly scaled. In that case use this function.

Since
1.0.0
Parameters
widthWidth in device independent pixels.
heightHeight in device independent pixels.
void setRecognitionMode ( int  recognitionMode)

Sets the recognition mode.

By default it is set to code recognition.

Since
5.2.0
Parameters
recognitionModeThe recognition mode (1 for text recognition, 2 for code recognition).
void setDeviceName ( String  deviceName)

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

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

Since
4.9.0
Parameters
deviceNameThe device name to be used.
void changeCameraFacing ( int  facing)

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

Since
3.0.0
Parameters
facingnew camera facing direction (0 for backward (default) camera, 1 for front camera)
void switchCameraFacing ( )

Changes to the opposite camera facing if it is supported.

Since
3.0.0
void setSuccessCallback ( Function  function)

Sets a callback for successful scans.

The callback is called with an object containing the String properties 'symbology', 'barcode' and 'isGs1DataCarrier'.

Since
1.0.0
void setCancelCallback ( Function  function)

Sets a callback for canceling the scanning (only on iOS).

Since
1.0.0
void startScanning ( )

Starts/restarts the scanning process.

Start or continue scanning barcodes after the creation of the barcode picker or a previous call to stopScanning.

Since
1.0.0
void startScanning ( boolean  startInPausedState)

Starts/restarts the scanning process.

Start or continue scanning barcodes after the creation of the barcode picker or a previous call to stopScanning.

Allows to start the camera preview without immediately also starting the scanning process.

Parameters
startInPausedStateWhether the scanning process should be paused.
Since
4.10.0
void pauseScanning ( )

Pauses the scanning process while keeping the camera preview running.

Use this method when you plan to briefly pause the scanning process and intend to resume it later. It is not recommended to use this method when you are interrupting the scanning process for longer periods of time as the camera preview will use considerable power.

Since
4.10.0
void resumeScanning ( )

Resumes a previously paused scanning process.

Use this method to resume scanning after pauseScanning was called. Calling resume on a picker that was not previously started with startScanning() is undefined.

Since
4.10.0
void stopScanning ( )

Stops the scanning process.

Since
1.0.0
void set1DScanningEnabled ( boolean  enabled)

Enables or disables the recognition of the following 1D barcode symbologies: EAN8, EAN13, UPCA, UPCE, Code128, Code39, Code93, ITF and Codabar.

By default EAN8, EAN13, UPCA, UPCE, Code128, Code39 and ITF are enabled.

Since
1.0.0
Parameters
enabledWhether all 1D symbologies should be enabled.
void set2DScanningEnabled ( boolean  enabled)

Enables or disables the recognition of the following 2D barcode symbologies: QR, DataMatrix, PDF417, Aztec Code and MicroQR.

By default only QR is enabled.

Since
1.0.0
Parameters
enabledboolean indicating whether all 2D symbologies are enabled
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
enabledWhether this symbology should be enabled.
void setTwoDigitAddOnEnabled ( boolean  enabled)

Enables or disables the two digit add-on for UPC and EAN codes.

In order to scan two-digit add-on codes, at least one of these symbologies must be activated as well: Ean13 & Upc12, Upce, or Ean8.

You can access an add-on in the success callback through result.addon (if you access the main barcode through result.barcode), if no add-on was scanned, it is undefined.

Important: Even if a code has an add-on it might be returned without that add-on sometimes as there may be frames where the recognition only recognized the main code.

Since
5.11.0
Parameters
enabledWhether this symbology should be enabled.
void setFiveDigitAddOnEnabled ( boolean  enabled)

Enables or disables the five digit add-on for UPC and EAN codes.

In order to scan two-digit add-on codes, at least one of these symbologies must be activated as well: Ean13 & Upc12, Upce, or Ean8.

You can access an add-on in the success callback through result.addon (if you access the main barcode through result.barcode), if no add-on was scanned, it is undefined.

Important: Even if a code has an add-on it might be returned without that add-on sometimes as there may be frames where the recognition only recognized the main code.

Since
5.11.0
Parameters
enabledWhether this symbology should be enabled.
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
enabledWhether this symbology should be enabled.
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.
void setCode32Enabled ( boolean  enabled)

Enables or disables the barcode decoder for Code32 codes.

By default scanning of Code32 codes is disabled.

Since
5.9.0
Parameters
enabledWhether this symbology should be enabled.
void setCode39Enabled ( boolean  enabled)

Enables or disables the barcode decoder for Code39 codes.

By default scanning of Code39 codes is enabled.

Since
1.0.0
Parameters
enabledWhether this symbology should be enabled.
void setCode93Enabled ( boolean  enabled)

Enables or disables the barcode decoder for Code93 codes.

By default scanning of Code93 codes is enabled.

Since
4.0.1
Parameters
enabledWhether this symbology should be enabled.
void setCode11Enabled ( boolean  enabled)

Enables or disables the barcode decoder for Code11 codes.

By default scanning of Code11 codes is disabled.

Since
4.9.0
Parameters
enabledWhether this symbology should be enabled.
void setCode128Enabled ( boolean  enabled)

Enables or disables the barcode decoder for Code128 codes.

By default scanning of Code128 codes is enabled.

Since
1.0.0
Parameters
enabledWhether this symbology should be enabled.
void setMicroPdf417Enabled ( boolean  enabled)

Enables or disables the barcode decoder for MicroPDF417.

By default scanning of MicroPDF417 codes is disabled.

Since
4.14.0
Parameters
enabledWhether this symbology should be enabled.
void setKIXEnabled ( boolean  enabled)

Enables or disables the barcode decoder for KIX codes.

By default scanning of KIX codes is disabled.

Since
4.16.0
Parameters
enabledWhether this symbology should be enabled.
void setRM4SCCEnabled ( boolean  enabled)

Enables or disables the barcode decoder for RM4SCC codes.

By default scanning of RM4SCC codes is disabled.

Since
4.16.0
Parameters
enabledWhether this symbology should be enabled.
void setPdf417Enabled ( boolean  enabled)

Enables or disables the barcode decoder for PDF417.

By default scanning of PDF417 codes is disabled.

Since
1.0.0
Parameters
enabledWhether this symbology should be enabled.
void setGS1DataBarEnabled ( boolean  enabled)

Enables or disables the barcode decoder for GS1 DataBar.

By default scanning of GS1 DataBar codes is disabled.

Parameters
enabledWhether this symbology should be enabled.
void setGS1DataBarExpandedEnabled ( boolean  enabled)

Enables or disables the barcode decoder for GS1 DataBar Expanded.

By default scanning of GS1 DataBar Expanded codes is disabled.

Parameters
enabledWhether this symbology should be enabled.
void setGS1DataBarLimitedEnabled ( boolean  enabled)

Enables or disables the barcode decoder for GS1 DataBar Limited.

By default scanning of GS1 DataBar Limited codes is disabled.

Parameters
enabledWhether this symbology should be enabled.
void setCode25Enabled ( boolean  enabled)

Enables or disables the barcode decoder for Code25 codes.

By default scanning of Code25 codes is disabled.

Since
4.13.0
Parameters
enabledWhether this symbology should be enabled.
void setItfEnabled ( boolean  enabled)

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

By default scanning of ITF codes is enabled.

Since
1.0.0
Parameters
enabledWhether this symbology should be enabled.
void setMsiPlesseyEnabled ( boolean  enabled)

Enables or disables the barcode decoder for MSI Plessey codes.

By default scanning of MSI Plessey codes is enabled.

Since
3.0.0
Parameters
enabledWhether this symbology should be enabled.
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 1 (Mod 10)

Since
3.0.0
Parameters
checksumTypeThe MSIPlesseyChecksumType your application uses (0 = No Checksum, 1 = Mod 10, 2 = Mod 11, 3 = Mod 1010, 4 = Mod 1110)
void setMaxiCodeEnabled ( boolean  enabled)

Enables or disables the barcode decoder for MaxiCode codes.

By default scanning of MaxiCode codes is disabled.

Since
4.9.0
Parameters
enabledWhether this symbology should be enabled.
void setQrEnabled ( boolean  enabled)

Enables or disables the barcode decoder for QR codes.

By default scanning of QR codes is disabled.

Parameters
enabledWhether this symbology should be enabled.
void setDataMatrixEnabled ( boolean  enabled)

Enables or disables the barcode decoder for DataMatrix codes.

By default scanning of DataMatrix codes is disabled.

Parameters
enabledWhether this symbology should be enabled.
void setDotCodeEnabled ( boolean  enabled)

Enables or disables the barcode decoder for DotCode codes.

By default scanning of DotCode codes is disabled.

Parameters
enabledWhether this symbology should be enabled.
void setInverseDetectionEnabled ( 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
2.0.0 (4.4.0 for QR)
Parameters
enabledWhether this mode should be enabled.
void setCodeDuplicateFilter ( int  duration)

Set the code duplicate filter to the given duration in milliseconds.

Parameters
durationThe duration of the duplicate filter in milliseconds. When set to values larger than zero, barcodes with the same symbology and data are filtered out if they are decoded less than duration milliseconds apart. Set this value to zero, if you do not want to filter duplicates. When set to -1, barcodes are filtered as duplicates if they match an already decoded barcode in the session.

By default, the duplicate filter is set to 500ms

Since
5.11.3
void restrictActiveScanningArea ( boolean  enabled)

Reduces the area in which barcodes are detected and decoded.

When activated, the active scanning area is defined by setScanningHotSpotHeight: and setScanningHotSpotToX:andY:. If this method is not enabled, barcodes in the full camera preview are detected and decoded.

See also
scanditsdkView::setScanningHotSpot(float, float)
scanditsdkview::setScanningHotSpotHeight(float)

By default this is not enabled.

Since
3.0.0
Parameters
enabledWhether the scanning area should be restricted.
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:):

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
scanditsdkView::restrictActiveScanningArea(boolean)
scanditsdkView::setScanningHotSpotHeight(float)
Since
1.0.0
Parameters
xThe hotspot's relative x coordinate.
yThe hotspot's relative y coordinate.
void setScanningHotSpotHeight ( float  height)

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

The height of the active scanning area is relative to the height of the camera preview 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
scanditsdkView::restrictActiveScanningArea(boolean)
scanditsdkView::setScanningHotSpot(float, float)
Since
1.0.0
Parameters
heightThe relative height of the active scanning area.
void setRelativeZoom ( float  zoom)

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

Since
1.0.0
Parameters
zoomthe percentage of the max zoom (between 0 and 1).
void setHighDensityModeEnabled ( boolean  enabled)

Turn on/off high density mode.

High density mode enables phones to work at higher camera resolution, provided they support it. When enabled, phones that are able to run the video preview at 1080p (1920x1080) will use 1080p and not just 720p (1280x720). High density mode gives better decode ranges at the expense of processing speed and allows to decode smaller code in the near range, or codes that further away.

By default, high density mode is disabled.

Since
1.0.0
Parameters
enabledwhether high density mode should be enabled.
void setTextRecognitionCallback ( Function  function)

Sets a callback for successful text recognition.

The callback is called with an object containing the String property 'text'.

Since
5.2.0
void setTextRecognitionSettings ( Map< String, Object >  settings)

Sets the settings for text recognition.

Since
5.2.0
Parameters
settingsproperties to be set on the text recognition.
void setRecognizedTextRejected ( boolean  rejected)

Whether this code is rejected or not.

If beeping/vibration is enabled, the device will beep and vibrate whenever text has been recognized. Set this property to true to suppress beeping/vibration. Use this functionality if you want to perform additional checks on the recognized text that can not be expressed through a regular expression.

Parameters
rejectedThe new rejection status.
Since
5.3
void switchTorchOn ( boolean  on)

Switches the torch (if available) on or off programmatically.

By default the torch switch is off.

Since
2.0.0
Parameters
ontrue when the torch should be switched on, false if the torch should be turned off.
void setTorchEnabled ( boolean  enabled)

Enables or disables the torch toggle button for all devices/cameras that support a torch.

By default it is enabled. The torch icon is never shown when the camera does not have a torch (most tablets, front cameras, etc).

Since
2.0.0
Parameters
enabledWhether the torch button should be shown.
void setTorchButtonMarginsAndSize ( float  leftMargin,
float  topMargin,
float  width,
float  height 
)

Sets the position at which the button to enable the torch is drawn.

By default the margins are 15 and width and height are 40.

Since
4.9.0
Parameters
leftMarginLeft margin in points.
topMarginTop margin in points.
widthWidth in points.
heightHeight in points.
void setBeepEnabled ( boolean  enabled)

Enables (or disables) the sound when a barcode is recognized.

If the phone's ring mode is set to muted or vibrate, no beep will be played regardless of the value.

Enabled by default.

Since
1.0.0
Parameters
enabledWhether the beep is enabled.
void setVibrateEnabled ( boolean  enabled)

Enables or disables the vibration when a code was recognized.

If the phone's ring mode is set to muted, no beep will be played regardless of the value.

Enabled by default.

Since
1.0.0
Parameters
enabledWhether vibrate is enabled.
void setCameraSwitchVisibility ( int  visibility)

Sets when the camera switch button is visible for devices that have more than one camera.

By default it is 0 (never visible).

Since
3.0.0
Parameters
visibilityThe visibility of the camera switch button (0 = never visible, 1 = only visible on tablets, 2 = always visible)
void setCameraSwitchButtonMarginsAndSize ( float  rightMargin,
float  topMargin,
float  width,
float  height 
)

Sets the position at which the button to switch the camera is drawn.

The X and Y coordinates are relative to the screen size, which means they have to be between 0 and 1. Be aware that the x coordinate is calculated from the right side of the screen and not the left like with the torch button.

By default this is set to x = 0.04, y = 0.02, width = 40 and height = 40.

Since
3.0.0
Parameters
rightMarginRight margin in points.
topMarginTop margin in points
widthWidth in points.
heightHeight in points.
void setViewfinderSize ( float  width,
float  height,
float  landscapeWidth,
float  landscapeHeight 
)

Sets the size of the viewfinder relative to the size of the view.

Changing this value does not(!) affect the area in which barcodes are successfully recognized. It only changes the size of the box drawn onto the scan screen. To restrict the active scanning area, use the methods listed below.

See also
scanditsdkView::restrictActiveScanningArea(boolean)
scanditsdkView::setScanningHotSpot(float, float)
scanditsdkView::setScanningHotSpotHeight(float)

By default the width is 0.8, height is 0.4, landscapeWidth is 0.6, landscapeHeight is 0.4

Since
3.0.0
Parameters
widthWidth of the viewfinder rectangle in portrait orientation.
heightHeight of the viewfinder rectangle in portrait orientation.
landscapeWidthWidth of the viewfinder rectangle in landscape orientation.
landscapeHeightHeight of the viewfinder rectangle in landscape orientation.
void drawViewfinder ( boolean  draw)

Shows/hides viewfinder rectangle and highlighted barcode location in the scan screen UI.

By default this is enabled.

Since
1.0.0
Parameters
drawWhether the viewfinder rectangle should be drawn.
void setViewfinderColor ( float  r,
float  g,
float  b 
)

Sets the color of the viewfinder before a bar code has been recognized.

By default this is: white (1.0, 1.0, 1.0)

Since
1.0.0
Parameters
rRed component (between 0.0 and 1.0).
gGreen component (between 0.0 and 1.0).
bBlue component (between 0.0 and 1.0).
void setViewfinderDecodedColor ( float  r,
float  g,
float  b 
)

Sets the color of the viewfinder once the bar code has been recognized.

By default this is: light blue (0.222, 0.753, 0.8)

Since
1.0.0
Parameters
rRed component (between 0.0 and 1.0).
gGreen component (between 0.0 and 1.0).
bBlue component (between 0.0 and 1.0).
void showToolBar ( boolean  show)

Adds (or removes) a tool bar to/from the bottom of the scan screen.

Since
1.0.0
Parameters
showboolean indicating whether toolbar should be shown.
void setToolBarButtonCaption ( String  caption)

Sets the caption of the toolbar button.

By default this is: "Cancel"

Since
1.0.0
Parameters
captionstring used for cancel button caption
void showSearchBar ( boolean  show)

Shows (or hides) a search bar at the top of the scan screen.

Since
1.0.0
Parameters
showWhether the search bar should be visible.
void setSearchBarActionButtonCaption ( String  caption)

Sets the caption of the search button at the top of the numerical keyboard.

By default this is: "Go"

Since
1.0.0
Parameters
captionCaption of the search button.
void setSearchBarCancelButtonCaption ( String  caption)

Sets the caption of the manual entry at the top.

By default this is: "Cancel"

Since
1.0.0
Parameters
captionCaption of the cancel button.
void setSearchBarPlaceholderText ( String  text)

Sets the text shown in the manual entry field when nothing has been entered yet.

By default this is: "Scan barcode or enter it here"

Since
1.0.0
Parameters
textA placeholder text shown when the search bar is empty.
void setMinSearchBarBarcodeLength ( int  length)

Sets the minimum size that a barcode entered in the manual searchbar has to have to possibly be valid.

By default this is set to 8.

Since
1.0.0
Parameters
lengthMinimum number of input characters.
void setMaxSearchBarBarcodeLength ( int  length)

Sets the maximum size that a barcode entered in the manual searchbar can have to possibly be valid.

By default this is set to 100.

Since
1.0.0
Parameters
lengthMaximum number of input characters.
void setScanSettingsProperty ( String  key,
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.

Only available on Android.

Since
5.11.3
Parameters
keyThe property's name.
valueThe property's value.

Member Data Documentation

void force2dRecognition

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