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
Properties | |
SIOverlayControllerDelegate | Delegate [get, set] |
UISearchBar | ManualSearchBar [get, set] |
UIToolbar | ToolBar [get, set] |
Sound Configuration | |
void | SetBeepEnabled (bool enabled) |
void | SetVibrateEnabled (bool enabled) |
bool | SetScanSoundResource (string path, string extension) |
Torch Configuration | |
void | SetTorchEnabled (bool enabled) |
bool | SetTorchOnImageResource (string fileName, string extension) |
bool | SetTorchOnImageResource (string fileName, string pressedFileName, string extension) |
bool | SetTorchOffImageResource (string fileName, string extension) |
bool | SetTorchOffImageResource (string fileName, string pressedFileName, string extension) |
void | SetTorchButtonRelativePosition (float x, float y, float width, float height) |
Camera Switch Configuration | |
void | SetCameraSwitchVisibility (SICameraSwitchVisibility visibility) |
bool | SetCameraSwitchImageResource (string fileName, string extension) |
bool | SetCameraSwitchImageResource (string fileName, string pressedFileName, string extension) |
void | SetCameraSwitchButtonRelativePosition (float x, float y, float width, float height) |
Viewfinder Configuration | |
Customize the viewfinder where the barcode location is highlighted. | |
void | DrawViewfinder (bool draw) |
void | SetViewfinderSize (float height, float width, float landscapeHeight, float landscapeWidth) |
void | SetViewfinderColor (float red, float green, float blue) |
void | SetViewfinderDecodedColor (float red, float green, float blue) |
void | SetTextForInitializingCamera (string text) |
void | ResetUI () |
Logo Configuration | |
Customize the scanning by Scandit logo - Note that including the logo in the UI is mandatory. | |
void | SetLogoOffset (int xOffset, int yOffset, int landscapeXOffset, int landscapeYOffset) |
bool | SetBannerImage (string fileName, string extension) |
Toolbar Configuration | |
void | ShowToolBar (bool show) |
void | SetToolBarButtonCaption (string caption) |
Searchbar Configuration | |
void | ShowSearchBar (bool show) |
void | setSearchBarActionButtonCaption (string caption) |
void | SetSearchBarCancelButtonCaption (string caption) |
void | SetSearchBarPlaceholderText (string caption) |
void | SetSearchBarKeyboardType (UIKeyboardType keyboardType) |
void | SetMinSearchBarBarcodeLength (int length) |
void | SetMaxSearchBarBarcodeLength (int length) |
Detailed Description
Controls the scan screen user interface.
The overlay controller can be used to configure various scan screen UI elements such as search bar, toolbar, torch, camera switch icon, scandit logo and the viewfinder.
Developers can inherit from the ScanditSDKOverlayController to implement their own scan screen user interfaces.
- Since
- 1.0.0
Copyright 2010 Mirasense AG. All rights reserved.
Member Function Documentation
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
-
enabled Whether 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
-
enabled Whether vibrate is enabled.
bool SetScanSoundResource | ( | string | path, |
string | extension | ||
) |
Sets the audio sound played when a code has been successfully recognized.
File needs to be placed in Resources folder.
Note: This feature is only available with the Scandit SDK Enterprise Packages.
The default is: "beep.wav"
- Since
- 2.0.0
- Parameters
-
path The file name of the sound file (without suffix). extension The file type.
- Returns
- Whether the change was successful.
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
-
enabled Whether the torch button should be shown.
bool SetTorchOnImageResource | ( | string | fileName, |
string | extension | ||
) |
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 also provide a resource with the same name but @2x appended and in higher resolution (like flash). ligh t-tur n-on -icon @2x. png
File needs to be placed in Resources folder.
By default this is: "flashlight-turn-on-icon.png"
- Since
- 2.0.0
- Parameters
-
fileName The file name for when the torch is on (without suffix). extension The file type.
- Returns
- Whether the change was successful.
bool SetTorchOnImageResource | ( | string | fileName, |
string | pressedFileName, | ||
string | extension | ||
) |
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 also provide a resource with the same name but @2x appended and in higher resolution (like flash). ligh t-tur n-on -icon @2x. png
File needs to be placed in Resources folder.
By default this is: "flashlight-turn-off-icon.png" and "flashlight-turn-off-icon-pressed.png"
- Since
- 2.0.0
- Parameters
-
fileName The file name for when the torch is on (without suffix). pressedFileName The file name for when the torch is on and it is pressed (without suffix). extension The file type.
- Returns
- Whether the change was successful.
bool SetTorchOffImageResource | ( | string | fileName, |
string | extension | ||
) |
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 also provide a resource with the same name but @2x appended and in higher resolution (like flash). ligh t-tur n-of f-ico n@2x .png
File needs to be placed in Resources folder.
By default this is: "flashlight-turn-off-icon.png"
- Since
- 2.0.0
- Parameters
-
fileName The file name for when the torch is off (without suffix). extension The file type.
- Returns
- Whether the change was successful.
bool SetTorchOffImageResource | ( | string | fileName, |
string | pressedFileName, | ||
string | extension | ||
) |
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 also provide a resource with the same name but @2x appended and in higher resolution (like flash). ligh t-tur n-on -icon @2x. png
By default this is: "flashlight-turn-on-icon.png" and "flashlight-turn-on-icon-pressed.png"
- Since
- 2.0.0
- Parameters
-
fileName The file name for when the torch is off (without suffix). pressedFileName The file name for when the torch is off and it is pressed (without suffix). extension The file type.
- Returns
- Whether the change was successful.
void SetTorchButtonRelativePosition | ( | float | x, |
float | y, | ||
float | width, | ||
float | 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.
- Since
- 2.0.0
- Parameters
-
x Relative x coordinate. y Relative y coordinate. width Width in points. height Height in points.
void SetCameraSwitchVisibility | ( | SICameraSwitchVisibility | visibility | ) |
Sets when the camera switch button is visible for devices that have more than one camera.
By default it is not shown.
- Since
- 3.0.0
- Parameters
-
visibility The visibility of the camera switch button.
bool SetCameraSwitchImageResource | ( | string | fileName, |
string | extension | ||
) |
Sets the image which is 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). ligh t-tur n-on -icon @2x. png
File needs to be placed in Resources folder.
By default this is: "camera-swap-icon.png"
- Since
- 3.0.0
- Parameters
-
fileName The file name of the camera swap button's image (without suffix). extension The file type.
- Returns
- Whether the change was successful.
bool SetCameraSwitchImageResource | ( | string | fileName, |
string | pressedFileName, | ||
string | extension | ||
) |
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). ligh t-tur n-on -icon @2x. 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
-
fileName The file name of the camera swap button's image (without suffix). pressedFileName The file name of the camera swap button's image when pressed (without suffix). extension The file type.
- Returns
- Whether the change was successful.
void SetCameraSwitchButtonRelativePosition | ( | float | x, |
float | y, | ||
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
-
x Relative x coordinate (from the right screen edge). y Relative y coordinate. width Width in points. height Height in points.
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
-
draw Whether the viewfinder rectangle should be drawn.
void SetViewfinderSize | ( | float | height, |
float | width, | ||
float | landscapeHeight, | ||
float | landscapeWidth | ||
) |
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
- ScanditSDKBarcodePicker::restrictActiveScanningArea(bool)
- ScanditSDKBarcodePicker::setScanningHotSpot(float, float)
- ScanditSDKBarcodePicker::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
-
height Height of the viewfinder rectangle in portrait orientation. width Width of the viewfinder rectangle in portrait orientation. landscapeHeight Height of the viewfinder rectangle in landscape orientation. landscapeWidth Width of the viewfinder rectangle in landscape orientation.
void SetViewfinderColor | ( | float | red, |
float | green, | ||
float | blue | ||
) |
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
-
red Red component (between 0.0 and 1.0). green Green component (between 0.0 and 1.0). blue Blue component (between 0.0 and 1.0).
void SetViewfinderDecodedColor | ( | float | red, |
float | green, | ||
float | blue | ||
) |
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
-
red Red component (between 0.0 and 1.0). green Green component (between 0.0 and 1.0). blue Blue component (between 0.0 and 1.0).
void ResetUI | ( | ) |
Resets the scan screen user interface to its initial state.
This resets the animation showing the barcode locations to its initial state.
- Since
- 1.0.0
void SetLogoOffset | ( | int | xOffset, |
int | yOffset, | ||
int | landscapeXOffset, | ||
int | landscapeYOffset | ||
) |
Sets the x and y offset at which the scanning by Scandit logo is drawn for both portrait and landscape orientation.
Please note that the standard Scandit SDK license do not allow you to hide the logo.
By default this is set to xOffset = 0, yOffset = 0, landscapeXOffset = 0, landscapeYOffset = 0.
- Since
- 2.0.0
- Parameters
-
xOffset x offset in pixels in portrait mode yOffset y offset in pixels in portrait mode landscapeXOffset x offset in pixels in landscape mode landscapeYOffset y offset in pixels in landscape mode
bool SetBannerImage | ( | string | fileName, |
string | extension | ||
) |
Sets the "scanning by Scandit" image which is being drawn at the bottom of the scan screen.
Use this method to show an alternative scanning by Scandit logo provided for your application by the Scandit team. Do not use this method without consulting with the Scandit team.
Note: This feature is only available with the Scandit SDK Enterprise Packages.
By default this is: "poweredby.png"
- Parameters
-
fileName of poweredby logo (without suffix) extension file type
- Returns
- boolean indicating whether the change was successful.
void ShowToolBar | ( | bool | show | ) |
Adds (or removes) a tool bar to/from the bottom of the scan screen.
- Since
- 1.0.0
- Parameters
-
show boolean 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
-
caption string used for cancel button caption
void ShowSearchBar | ( | bool | show | ) |
Shows (or hides) a search bar at the top of the scan screen.
- Since
- 1.0.0
- Parameters
-
show Whether 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
-
caption Caption 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
-
caption Caption of the cancel button.
void SetSearchBarPlaceholderText | ( | string | caption | ) |
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
-
caption A placeholder text shown when the search bar is empty.
void SetSearchBarKeyboardType | ( | UIKeyboardType | keyboardType | ) |
Sets the type of keyboard that is shown to enter characters into the search bar.
By default this is: UIKeyboardTypeNumberPad
- Since
- 1.0.0
- Parameters
-
keyboardType Type of keyboard that is shown when user uses search bar.
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
-
length Minimum 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
-
length Maximum number of input characters.
Property Documentation
|
getset |
The overlay controller delegate that handles callbacks such as didScanBarcode or didCancelWithStatus.
As of Scandit SDK 4.7.0, ScanditSDKBarcodePicker::scanDelegate is the preferred way to listen to successful scan events, and ScanditSDKBarcodePicker::cancelDelegate to listen to cancel events.
- Since
- 1.0.0
|
getset |
The manual search bar that can be shown at the top of the scan sreen.
- Since
- 1.0.0
|
getset |
The tool bar that can be shown at the bottom of the scan screen.
- Since
- 1.0.0