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 Xamarin.Android and Data Capture SDK Documentation for Xamarin.iOS

IScanditSDKOverlay Interface Reference

Public Member Functions

Torch Configuration

Enable and customize appearance of the torch icon.

void AddListener (ScanditSDKListener listener)
 
void RemoveListener (ScanditSDKListener listener)
 
void RemoveAllListenes ()
 
void SetTorchEnabled (bool enabled)
 
void SetTorchOnImage (Bitmap image)
 
void SetTorchOnImage (Bitmap image, Bitmap pressedImage)
 
void SetTorchOffImage (Bitmap image)
 
void SetTorchOffImage (Bitmap image, Bitmap pressedImage)
 
void SetTorchButtonPosition (float relativeX, float relativeY, int width, int height)
 
Sound Configuration

Customize the scan sound.

void SetBeepEnabled (bool enabled)
 
void SetVibrateEnabled (bool enabled)
 
Camera Switch Configuration

Enable camera switch and set icons

void SetCameraSwitchVisibility (int visibility)
 
void SetCameraSwitchImage (Bitmap image, Bitmap pressedImage)
 
void SetCameraSwitchButtonPosition (float invertedRelativeX, float relativeY, int width, int height)
 
Viewfinder Configuration

Customize the viewfinder where the barcode location is highlighted.

void DrawViewfinder (bool draw)
 
void SetViewfinderDimension (float width, float height)
 
void SetViewfinderDimension (float width, float height, float landscapeWidth, float landscapeHeight)
 
void SetViewfinderColor (float r, float g, float b)
 
void SetViewfinderDecodedColor (float r, float g, float b)
 
void ResetGUI ()
 
Logo Configuration

Customize the scanning by Scandit logo - Note that including the logo in the UI is mandatory.

void SetLogoOffsets (int xOffset, int yOffset, int landscapeXOffset, int landscapeYOffset)
 
void SetInfoBannerY (float offset)
 
Searchbar Configuration

Customize searchbar appearance

void ShowSearchBar (bool show)
 
void SetSearchBarPlaceholderText (string text)
 
void SetSearchBarKeyboardType (int inputType)
 
Deprecated

Deprecated methods.

void ShowTitleBar (bool show)
 
void ShowToolBar (bool show)
 
void ShowMostLikelyBarcodeUIElement (bool show)
 
void SetTextForInitialScanScreenState (string text)
 
void SetTextForBarcodePresenceDetected (string text)
 
void SetTextForBarcodeDecodingInProgress (string text)
 
void SetTextForMostLikelyBarcodeUIElement (string text)
 
void SetTextIfNoBarcodeWasRecognized (string text)
 
void SetTextToSuggestManualEntry (string text)
 
void SetTitleMessage (string message)
 
void SetLeftButtonCaption (string caption)
 
void SetLeftButtonCaptionWhenKeypadVisible (string caption)
 
void SetRightButtonCaption (string caption)
 
void SetRightButtonCaptionWhenKeypadVisible (string caption)
 
void DrawViewfinderTextHook (bool draw)
 

Detailed Description

Interface of all the possible customization options for the standard scan GUI which is displayed on top of the video feed in which barcodes are decoded.

Copyright 2011 Scandit AG. All rights reserved.

Member Function Documentation

void AddListener ( ScanditSDKListener  listener)

Adds a listener that will receive callbacks for scan events.

Parameters
listenerA new listener to add.
void RemoveListener ( ScanditSDKListener  listener)

Removes a listener.

Parameters
listenerA listener to be removed.
void RemoveAllListenes ( )

Removes all registered listeners.

void SetBeepEnabled ( bool  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 ( bool  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 SetTorchEnabled ( bool  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 SetTorchOnImage ( Bitmap  image)

Sets the image which is being drawn when the torch is on.

If you want this to be displayed in proper resolution on high resolution screens, you need to provide a resource big enough to work with at least xhdpi resolution.

Since
2.0.0
Parameters
imageThe new image for when the torch is on.
void SetTorchOnImage ( Bitmap  image,
Bitmap  pressedImage 
)

Sets the images which are being drawn when the torch is on.

If you want this to be displayed in proper resolution on high resolution screens, you need to provide a resource big enough to work with at least xhdpi resolution.

Since
2.0.0
Parameters
imageThe new image for when the torch is on.
pressedImageThe new image for when the torch is on and it is pressed.
void SetTorchOffImage ( Bitmap  image)

Sets the image which is being drawn when the torch is off.

If you want this to be displayed in proper resolution on high resolution screens, you need to provide a resource big enough to work with at least xhdpi resolution.

Since
2.0.0
Parameters
imageThe new image for when the torch is off.
void SetTorchOffImage ( Bitmap  image,
Bitmap  pressedImage 
)

Sets the images which are being drawn when the torch is off.

If you want this to be displayed in proper resolution on high resolution screens, you need to provide a resource big enough to work with at least xhdpi resolution.

Since
2.0.0
Parameters
imageThe new image for when the torch is off.
pressedImageThe new image for when the torch is off and it is pressed.
void SetTorchButtonPosition ( float  relativeX,
float  relativeY,
int  width,
int  height 
)

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

The X and Y coordinates are relative to the screen size, which means they have to be between 0 and 1.

By default this is set to x = 0.05, y = 0.01, width = 67, height = 33.

Since
2.0.0
Parameters
relativeXRelative x coordinate.
relativeYRelative y coordinate.
widthWidth in pixels.
heightHeight in pixels.
void SetCameraSwitchVisibility ( int  visibility)

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

By default it is CAMERA_SWITCH_NEVER.

Since
3.0.0
Parameters
visibilityThe visibility of the camera switch button (CAMERA_SWITCH_NEVER, CAMERA_SWITCH_ON_TABLET, CAMERA_SWITCH_ALWAYS)
void SetCameraSwitchImage ( Bitmap  image,
Bitmap  pressedImage 
)

Sets the images which are being drawn when the camera switch button is visible.

If you want this to be displayed in proper resolution on high resolution screens, you need to also provide a resource with the same name but @2x appended and in higher resolution (like flash.nosp@m.ligh.nosp@m.t-tur.nosp@m.n-on.nosp@m.-icon.nosp@m.@2x..nosp@m.png).

File needs to be placed in Resources folder.

By default this is: "camera-swap-icon.png" and "camera-swap-icon-pressed.png"

Since
3.0.0
Parameters
imageThe new image for the camera swap button.
pressedImageThe new image for the camera swap button when it is pressed.
void SetCameraSwitchButtonPosition ( float  invertedRelativeX,
float  relativeY,
int  width,
int  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.05, y = 0.01, width = 67 and height = 33.

Since
3.0.0
Parameters
invertedRelativeXRelative x coordinate (from the right screen edge).
relativeYRelative y coordinate.
widthWidth in pixels.
heightHeight in pixels.
void DrawViewfinder ( bool  draw)

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

Note: This feature is only available with the Scandit SDK Enterprise Packages.

By default this is enabled.

Since
1.0.0
Parameters
drawWhether the viewfinder rectangle should be drawn.
void SetViewfinderDimension ( float  width,
float  height 
)

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

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.

By default the width is 0.6 and the height is 0.25

Parameters
widthWidth of the viewfinder rectangle.
heightHeight of the viewfinder rectangle.
void SetViewfinderDimension ( float  width,
float  height,
float  landscapeWidth,
float  landscapeHeight 
)

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

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
ScanditSDK::restrictActiveScanningArea(bool)
ScanditSDK::setScanningHotSpot(float, float)
ScanditSDK::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 SetViewfinderColor ( float  r,
float  g,
float  b 
)

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

Note: This feature is only available with the Scandit SDK Enterprise Packages.

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.

Note: This feature is only available with the Scandit SDK Enterprise Packages.

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 ResetGUI ( )

Resets the scan screen user interface to its initial state.

This resets any information in the search bar and resets the animation showing the barcode locations to its initial state.

Since
1.0.0
void SetLogoOffsets ( int  xOffset,
int  yOffset,
int  landscapeXOffset,
int  landscapeYOffset 
)

Sets the x and y offset at which the Scandit logo should be drawn for both portrait and landscape orientation.

Be aware that the standard Scandit SDK licenses do not allow you to hide the logo.

Parameters
xOffsetOffset on the x axis in dip. Default is 0.
yOffsetOffset on the y axis in dip. Default is 0.
landscapeXOffsetOffset on the x axis in landscape mode in dip. Default is 0.
landscapeYOffsetOffset on the y axis in landscape mode in dip. Default is 0.
void SetInfoBannerY ( float  offset)

Sets the y coordinate of the info banner relative to the screen height.

The info banner contains the 'powered by Scandit' logo and the 'most likely barcode' UI element if it is enabled.

Parameters
offsetThe banner's y coordinate relative to the screen size. Default is 0.7.
void ShowSearchBar ( bool  show)

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

As of 4.0.0 the legacy picker does no longer support a search bar.

Since
1.0.0
Parameters
showWhether the search bar should be visible.
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 SetSearchBarKeyboardType ( int  inputType)

Sets the type of keyboard that is shown when entering characters into the search bar.

Since
1.0.0
Parameters
inputTypeThe new keyboard type. Default is InputType.TYPE_CLASS_NUMBER
void ShowTitleBar ( bool  show)

Adds (or removes) the title bar at the top of the scan screen.

Since
1.0.0
Parameters
showTrue if a title bar should be shown. Default is true.
void ShowToolBar ( bool  show)

Adds (or removes) the tool bar at the bottom of the scan screen.

Since
1.0.0
Parameters
showTrue if a tool bar should be shown. Default is true.
void ShowMostLikelyBarcodeUIElement ( bool  show)

Add the 'most likely barcode' UI element.

This element is displayed below the viewfinder when the barcode engine is not 100% confident in its result and asks for user confirmation. This element is seldom displayed - typically only when decoding challenging barcodes with fixed focus cameras.

Since
1.0.0
Parameters
showTrue if the 'most likely barcode' UI element should be shown.
void SetTextForInitialScanScreenState ( string  text)

Sets the text that will be displayed above the viewfinder to tell the user to align it with the barcode that should be recognized.

Since
1.0.0
Parameters
textThe new text. Default is "Align code with box".
void SetTextForBarcodePresenceDetected ( string  text)

Sets the text that will be displayed above the viewfinder to tell the user to align it with the barcode and hold still because a potential code seems to be on the screen.

Since
1.0.0
Parameters
textThe new text. Default is "Align code and hold still".
void SetTextForBarcodeDecodingInProgress ( string  text)

Sets the text that will be displayed above the viewfinder to tell the user to hold still because a barcode is aligned with the box and the recognition is trying to recognize it.

Since
1.0.0
Parameters
textThe new text. Default is "Decoding ...".
void SetTextForMostLikelyBarcodeUIElement ( string  text)

Sets the text that is displayed alongside the 'most likely barcode' UI element that is displayed when the barcode engine is not 100% confident in its result and asks for user confirmation.

Since
1.0.0
Parameters
textThe new text. Default is "Tap to use this likely number".
void SetTextIfNoBarcodeWasRecognized ( string  text)

Sets the text that is displayed if the engine was unable to recognize the barcode.

Since
1.0.0
Parameters
textThe new text. Default is "No barcode recognized".
void SetTextToSuggestManualEntry ( string  text)

Sets the text that is displayed if the engine was unable to recognize the barcode and it is suggested to enter the barcode manually.

Since
1.0.0
Parameters
textThe new text. Default is "Enter barcode via keypad".
void SetTitleMessage ( string  message)

Sets the title shown at the top of the screen.

Since
1.0.0
Parameters
messageThe new title message. Default is "Scan a barcode".
void SetLeftButtonCaption ( string  caption)

Sets the caption of the left button.

Since
1.0.0
Parameters
captionThe new button caption. Default is "KEYPAD".
void SetLeftButtonCaptionWhenKeypadVisible ( string  caption)

Sets the caption of the left button when the keypad is visible.

Since
1.0.0
Parameters
captionThe new button caption. Default is "OK".
void SetRightButtonCaption ( string  caption)

Sets the caption of the right button.

Since
1.0.0
Parameters
captionThe new button caption. Default is "CANCEL".
void SetRightButtonCaptionWhenKeypadVisible ( string  caption)

Sets the caption of the right button when the keypad is visible.

Since
1.0.0
Parameters
captionThe new button caption. Default is "CANCEL".
void DrawViewfinderTextHook ( bool  draw)

Sets whether to draw the hook at the top of the viewfinder that displays text.

Since
1.0.0
Parameters
drawTrue if the hook should be drawn. Default is true.