Label Capture Validation Flow Overlay
Defined in package com.scandit.datacapture.label.ui.overlay.validation
- LabelCaptureValidationFlowOverlay
class LabelCaptureValidationFlowOverlay : FrameLayout
Added in version 7.3.0
Specialized overlay that provides a guided scanning experience with validation flow capabilities. This overlay enables multi-step scanning for complete label capture, allowing users to scan label fields progressively across multiple scans and providing a user-friendly data review and correction interface.
Key features of the validation flow:
Multi-step scanning - Capture several label fields across multiple scans
Field-by-field validation - Validate individual fields as they are captured
User review interface - Allow users to review and correct captured data
Configurable hint messages - Guide users through different scanning stages
Manual input support - Enable manual entry for fields that cannot be scanned
The validation flow ensures complete and accurate results by aggregating captured fields into a complete label which is reported through the LabelCaptureValidationFlowListener.
Note
This overlay focuses on validation flow and does not provide barcode or field highlighting. For visual feedback during scanning, use LabelCaptureBasicOverlay alongside this overlay.
Warning
The validation flow overlay only works with a single label definition. This label definition can contain multiple barcodes, text fields, expiry dates, and other field types.
- newInstance(context, mode, view)
static @NonNull LabelCaptureValidationFlowOverlay newInstance(@NonNull Context context, LabelCapture mode, @Nullable DataCaptureView view)
Added in version 7.3.0
Constructs a new overlay to visualize the label capture validation flow. When view is non-null, the overlay is automatically added to the view. Otherwise, the overlay needs to be added through a call to DataCaptureView.addOverlay().
LabelCaptureValidationFlowOverlay overlay = LabelCaptureValidationFlowOverlay.newInstance(this, labelCapture, dataCaptureView); overlay.setListener(this::onLabelValidated);
- applySettings(settings)
void
applySettings(@NonNull LabelCaptureValidationFlowSettings settings)Added in version 7.3.0
Applies the new settings to the validation flow overlay.
- onResume()
void
onResume()Added in version 7.3.0
Notifies the overlay that the container has resumed.
This method should be called in a Fragment or Activity’s onResume method to allow starting the scanning process or to restore a state previously paused by onPause().
- onPause()
void
onPause()Added in version 7.3.0
Notifies the overlay that the container has paused.
This method should be called in a Fragment or Activity’s onPause method to pause the scanning flow. The scan state will then be restored when onResume() in called.
- listener
@NonNull LabelCaptureValidationFlowListener getListener()
void
setListener(@NonNull LabelCaptureValidationFlowListener value)Added in version 7.3.0
Sets the listener to this overlay instance to observe the label capture mode and get notified when a label has been validated and accepted by the end user.