Barcode Count
Defined in package com.scandit.datacapture.barcode.count.capture
- BarcodeCount
class BarcodeCount : DataCaptureMode
Added in version 6.14.0
Barcode Count is a data capture mode that implements MatrixScan Count in use cases that include a counting workflow such as receiving, inventory count, and stock taking. MatrixScan Count is an out-of-the-box scan and count solution that enables faster and more accurate counting of multiple items at once.
Learn more on how to use Barcode Count in our Get Started guide.
- forDataCaptureContext(dataCaptureContext, settings)
static @NonNull BarcodeCount forDataCaptureContext( @Nullable DataCaptureContext dataCaptureContext, @NonNull BarcodeCountSettings settings)
Added in version 6.14.0
Constructs a new barcode count mode with the provided context and settings. When the context is not null, the capture mode is automatically added to the context.
- isEnabled
boolean
isEnabled()void
setEnabled(boolean
value)Added in version 6.14.0
Implemented from DataCaptureMode. See DataCaptureMode.isEnabled.
- applySettings(settings)
void
applySettings(@NonNull BarcodeCountSettings settings)Added in version 6.14.0
Asynchronously applies the new settings to the barcode scanner. If the scanner is currently running, the task will complete when the next frame is processed, and will use the new settings for that frame. If the scanner is currently not running, the task will complete as soon as the settings have been stored and won’t wait until the next frame is going to be processed.
- applySettings(settings, whenDone)
void
applySettings(@NonNull BarcodeCountSettings settings, @Nullable Runnable whenDone)Added in version 6.14.0
Asynchronously applies the new settings to the barcode scanner, then calls whenDone. If the scanner is currently running, the task will complete when the next frame is processed, and will use the new settings for that frame. If the scanner is currently not running, the task will complete as soon as the settings have been stored and won’t wait until the next frame is going to be processed.
- addListener(listener)
void
addListener(@NonNull BarcodeCountListener listener)Added in version 6.14.0
Adds the listener to observe this barcode capture instance.
If the listener is already observing the barcode count instance, calling this method has no effect.
- removeListener(listener)
void
removeListener(@NonNull BarcodeCountListener listener)Added in version 6.14.0
Removes a previously added listener from this barcode count instance.
If the listener is not currently observing the barcode count instance, calling this method has no effect.
- reset()
void
reset()Added in version 6.14.0
Resets the session, effectively clearing the history of tracked and unscanned barcodes.
- startScanningPhase()
void
startScanningPhase()Added in version 6.14.0
Starts the capture session. If the isEnabled is false, this call has no effect.
- createRecommendedCameraSettings()
static @NonNull CameraSettings createRecommendedCameraSettings()
Added in version 6.14.0
Returns the recommended camera settings for use with barcode count.
- dataCaptureContext
@Nullable DataCaptureContext getDataCaptureContext()
Added in version 6.14.0
Implemented from DataCaptureMode. See DataCaptureMode.dataCaptureContext.
- feedback
@NonNull BarcodeCountFeedback getFeedback()
void
setFeedback(@NonNull BarcodeCountFeedback value)Added in version 6.14.0
Instance of BarcodeCountFeedback that is used by the barcode scanner to notify users about Success and Failure events.
The default instance of the Feedback will have both sound and vibration enabled. A default beep sound will be used for the sound.
- endScanningPhase()
void
endScanningPhase()Added in version 6.15.0
Disables this mode and switches off the current FrameSource.
- setBarcodeCountCaptureList(list)
void
setBarcodeCountCaptureList(@NonNull BarcodeCountCaptureList list)Added in version 6.15.0
Enables “Scanning against a list” mode, which provides additional functionality when looking for a specific set of Barcodes.
- setAdditionalBarcodes(additionalBarcodes)
void
setAdditionalBarcodes(@NonNull List<@NonNull Barcode> additionalBarcodes)Added in version 6.16.0
Use this method to inject barcodes that will be used as partial scanning result. BarcodeCountView will consider these barcodes when updating the UI. Note that, if scanning against a list where multiple instances of the same barcode are expected, each entry in this list will only count as 1 towards the expected total. In order to specify that several instances of a barcode were scanned in previous sessions, this list should include one entry per each of those instances.
- clearAdditionalBarcodes()
void
clearAdditionalBarcodes()Added in version 6.16.0
Clears the additional barcodes.