Deprecation warning
Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.
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
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 () |
Properties | |
bool | AutoFocusOnTapEnabled [get, set] |
bool | PinchToZoomEnabled [get, set] |
ScanOverlay | ScanOverlay [get, set] |
string | ScanPageTitle [get, set] |
string | CancelButtonText [get, set] |
Events | |
DidScanDelegate | DidScan |
DidStopDelegate | DidStop |
Detailed Description
Interface for Scandit BarcodePicker
Member Function Documentation
Task<bool> SwitchTorchOnAsync | ( | bool | on | ) |
Asynchronously turn on the torch (if supported)
- Parameters
-
on Whether the torch should be enabled.
///
- Returns
- 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.
- Parameters
-
zoom Relative zoom between 0 and 1.0, where 0 is no zoom, and 1.0 corresponds to the maximum zoom level.
- Returns
- 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.
- Parameters
-
settings The new scan settings
- Returns
- 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
- Returns
- Action that completes when the scanning has been paused.
Task ResumeScanningAsync | ( | ) |
Resume scanning of barcodes
Resume scanning barcodes after pausing.
- Returns
- 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.
- Returns
- Task that completes when scanning is stopped and the camera is closed.
Task StartScanningAsync | ( | bool | startInPausedState = false | ) |
Open camera and start barcode recognition.
- Parameters
-
startInPausedState If 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.
- Returns
- 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.
- Returns
- ScanSettings object with default values
Property Documentation
|
getset |
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.
|
getset |
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.
|
getset |
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.
|
getset |
Title of the scan page used in iOS navigation controller (if available)
|
getset |
Text of cancle/back button to close scan page
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.