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

IBarcodePicker Interface Reference

Public Member Functions

Task< bool > SwitchTorchOnAsync (bool on)
Task< bool > SetRelativeZoomAsync (float zoom)
Task ApplySettingsAsync (ScanSettings settings)
Task PauseScanningAsync ()
Task ResumeScanningAsync ()
Task StopScanningAsync ()
Task StartScanningAsync (bool startInPausedState=false)
ScanSettings GetDefaultScanSettings ()
IParser CreateParserForFormat (DataFormat parserFormat)


bool AutoFocusOnTapEnabled [get, set]
bool PinchToZoomEnabled [get, set]
Orientation AllowedOrientations [get, set]
ScanOverlay ScanOverlay [get, set]
string ScanPageTitle [get, set]
string CancelButtonText [get, set]
bool AlwaysShowModally [get, set]


DidScanDelegate DidScan
DidStopDelegate DidStop
DidSwipeDelegate DidSwipe
DidPressVolumeButtonDelegate DidPressVolumeButton

Detailed Description

Interface for Scandit BarcodePicker

Member Function Documentation

Task<bool> SwitchTorchOnAsync ( bool  on)

Asynchronously turn on the torch (if supported)

onWhether the torch should be enabled.


Task that completes when the torch was turned on/off.
Task<bool> SetRelativeZoomAsync ( float  zoom)

Sets the zoom to the given percentage of the maximum analog zoom possible.

zoomRelative zoom between 0 and 1.0, where 0 is no zoom, and 1.0 corresponds to the maximum zoom level.
Task that completes when the relative zoom values was set.
Task ApplySettingsAsync ( ScanSettings  settings)

Apply new scan settings to the barcode picker.

This method allows you to change barcode scanner settingsafter the picker has been initialized. The new settings are passed to the barcode recognition engine instantly, however they'll will only take effect in the next frame. In case the scanner has not been started yet, the settings are applied when it starts. In that case the returned action completes immediately.

settingsThe new scan settings
Action that completes when the settings have been applied. Every frame processed after the settings have been applied will use the new settings.
Task PauseScanningAsync ( )

Pause scanning of barcodes.

Puts the barcode scanner in paused state. In paused state the camera continues streaming images to the preview element, but not barcode recognition takes place. To resume scanning barcodes use ResumeScanningAsync

Action that completes when the scanning has been paused.
Task ResumeScanningAsync ( )

Resume scanning of barcodes

Resume scanning barcodes after pausing.

Action that completes when the scanning has been resumed
Task StopScanningAsync ( )

Stop scanning and close the camera.

When you call this method, the currently shown picker will be stopped and closed In case the camera is not running, this call has no effect.

Task that completes when scanning is stopped and the camera is closed.
Task StartScanningAsync ( bool  startInPausedState = false)

Open camera and start barcode recognition.

startInPausedStateIf true, starts the picker in paused state. The camera preview will be shown, but no barcodes will be scanned. You will need to call ResumeScanningAsync to start scanning barcodes.

Opens the cmaera for video streaming and sets up barcode recognition using the current barcode scanner settings. The barcode picker will be shown in full-screen until StopScanningAsync is called on the picker, or the user uses the on-screen navigation to return to the previous page.

On Android the barcode picker is implemented in a separate activity that is pushed onto the actity stack when start scanning is called. On iOS, the picker is either shown modally, or as a navigation view controller, depending on whether the current pages has a a navigation view controller or not. On Windows, the picker is implemented in a separate page.

A task that completes when the camera is opened, and scanning and recognition are started.
ScanSettings GetDefaultScanSettings ( )

Returns a new ScanSettings instance with all settings set to defaults.

ScanSettings object with default values
IParser CreateParserForFormat ( DataFormat  parserFormat)

Instantiates a parser object.

This method only returns a parser instance if the license used to instantiate the picker includes the usage of the Scandit Parser Library.Otherwise an exception will be thrown.

parserFormatThe format of the input data for the parser.
The parser instance or an exception on error.

Property Documentation

bool AutoFocusOnTapEnabled

Whether tapping on the screen should trigger an auto-focus.

By default, the camera triggers an auto-focus whenever the user taps the screen. To disable this feature, set this property to false.

This feature is only available on iOS.

bool PinchToZoomEnabled

Whether pinch to zoom is enabled

By default, the camera preview zoom factor can be changed by using a pinch gesture. To disable this feature, set this property to NO. The feature is only available on devices with iOS 7 and greater. On Android, pinch to zoom is depending on zoom support of the device.

This feature is only available on Android and iOS.

Orientation AllowedOrientations

Orientations the barcode picker is allowed to rotate to.

By default, the orientation is All.

Get the scan overlay

The scan overlay is responsible for displaying the scan UI, e.g. the view finder as well as the highlighted barcodes. The scan overlay provides a variety of options to configure the look and feel of the UI.

string ScanPageTitle

Title of the scan page used in iOS navigation controller (if available)

string CancelButtonText

Text of cancel/back button to close scan page

bool AlwaysShowModally

A flag that forces the service to always show the picker modally.

Event Documentation

DidScanDelegate DidScan

Barcode scanned event.

Barcode scanned events are emitted whenever a new barcode has been recognized. The scan delegate is invoked from a picker-internal thread and you must thus post any GUI-related work to the main thread.

DidStopDelegate DidStop

Barcode stopped event

Emitted when the barcode scanner has been stopped, either by the user or programmatically.

DidSwipeDelegate DidSwipe

Swipe event

Emitted when the user swipes over the barcode scanner.

DidPressVolumeButtonDelegate DidPressVolumeButton

Volume button press event

Emitted when the user presses one of the volume buttons while the barcode scanner is visible.