Class TextDataScannerStep
-
- All Implemented Interfaces:
public final class TextDataScannerStep
Defines a single step of the data scanning flow.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
TextDataScannerStep.GenericTextValidationCallback
Callback for text validation.
public interface
TextDataScannerStep.CleanRecognitionResultCallback
Optional callback to clean recognized string prior to validation. Allows to increase the quality and speed of the recognition.
public class
TextDataScannerStep.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static Long
SIGNIFICANT_DELAY_DEFAULT
public final static Float
DEFAULT_FINDER_HEIGHT
private final String
stepTag
private final String
title
private final String
guidanceText
private final String
pattern
private final Boolean
shouldMatchSubstring
private final TextDataScannerStep.GenericTextValidationCallback
validationCallback
private final TextDataScannerStep.CleanRecognitionResultCallback
cleanRecognitionResultCallback
private final Float
preferredZoom
private final AspectRatio
aspectRatio
private final Float
unzoomedFinderHeight
private final Set<Character>
allowedSymbols
private final Long
significantShakeDelay
public final static TextDataScannerStep.Companion
Companion
-
Constructor Summary
Constructors Constructor Description TextDataScannerStep(String stepTag, String title, String guidanceText, String pattern, Boolean shouldMatchSubstring, TextDataScannerStep.GenericTextValidationCallback validationCallback, TextDataScannerStep.CleanRecognitionResultCallback cleanRecognitionResultCallback, Float preferredZoom, AspectRatio aspectRatio, Float unzoomedFinderHeight, Set<Character> allowedSymbols, Long significantShakeDelay)
-
Method Summary
Modifier and Type Method Description final String
getStepTag()
The tag of the scanning step to make. final String
getTitle()
Title for a value. final String
getGuidanceText()
User guidance for the step. final String
getPattern()
Sets a validation pattern (Supports ? final Boolean
getShouldMatchSubstring()
Find and match only part of the whole string if the pattern is used. final TextDataScannerStep.GenericTextValidationCallback
getValidationCallback()
Callback for text validation. final TextDataScannerStep.CleanRecognitionResultCallback
getCleanRecognitionResultCallback()
Callback to clean recognized string prior to validation. final Float
getPreferredZoom()
Zoom level required for this step. final AspectRatio
getAspectRatio()
Aspect ratio for the step. final Float
getUnzoomedFinderHeight()
Height of the finder when view "unzoomed" (for zoom-level 1.0). final Set<Character>
getAllowedSymbols()
Allowed symbols to be detected. final Long
getSignificantShakeDelay()
Detection will be paused after significant movement. -
-
Constructor Detail
-
TextDataScannerStep
TextDataScannerStep(String stepTag, String title, String guidanceText, String pattern, Boolean shouldMatchSubstring, TextDataScannerStep.GenericTextValidationCallback validationCallback, TextDataScannerStep.CleanRecognitionResultCallback cleanRecognitionResultCallback, Float preferredZoom, AspectRatio aspectRatio, Float unzoomedFinderHeight, Set<Character> allowedSymbols, Long significantShakeDelay)
-
-
Method Detail
-
getStepTag
final String getStepTag()
The tag of the scanning step to make. It will be indicated in the result.
-
getGuidanceText
final String getGuidanceText()
User guidance for the step.
-
getPattern
final String getPattern()
Sets a validation pattern (Supports ? - any character, # - any digit, all other characters represent themselves). Empty string or null will disable the validation)
-
getShouldMatchSubstring
final Boolean getShouldMatchSubstring()
Find and match only part of the whole string if the pattern is used.
-
getValidationCallback
final TextDataScannerStep.GenericTextValidationCallback getValidationCallback()
Callback for text validation.
-
getCleanRecognitionResultCallback
final TextDataScannerStep.CleanRecognitionResultCallback getCleanRecognitionResultCallback()
Callback to clean recognized string prior to validation.
-
getPreferredZoom
final Float getPreferredZoom()
Zoom level required for this step.
-
getAspectRatio
final AspectRatio getAspectRatio()
Aspect ratio for the step.
-
getUnzoomedFinderHeight
final Float getUnzoomedFinderHeight()
Height of the finder when view "unzoomed" (for zoom-level 1.0). Defaults to 40.
-
getAllowedSymbols
final Set<Character> getAllowedSymbols()
Allowed symbols to be detected.
-
getSignificantShakeDelay
final Long getSignificantShakeDelay()
Detection will be paused after significant movement. 0 by default.
-
-
-
-