Class TextPatternScannerStep
-
- All Implemented Interfaces:
public final class TextPatternScannerStep
Defines a single step of the data scanning flow.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
TextPatternScannerStep.TextPatternScanningValidationCallback
Callback for the scanned text validation.
public interface
TextPatternScannerStep.CleanScanningResultCallback
Optional callback to clean scanned string prior to validation. Allows to increase the quality and speed of the scanning.
public class
TextPatternScannerStep.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 TextPatternScannerStep.TextPatternScanningValidationCallback
validationCallback
private final TextPatternScannerStep.CleanScanningResultCallback
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 TextPatternScannerStep.Companion
Companion
-
Constructor Summary
Constructors Constructor Description TextPatternScannerStep(String stepTag, String title, String guidanceText, String pattern, Boolean shouldMatchSubstring, TextPatternScannerStep.TextPatternScanningValidationCallback validationCallback, TextPatternScannerStep.CleanScanningResultCallback 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. final Boolean
getShouldMatchSubstring()
Find and match only part of the whole string if the pattern is used. final TextPatternScannerStep.TextPatternScanningValidationCallback
getValidationCallback()
Callback for text validation. final TextPatternScannerStep.CleanScanningResultCallback
getCleanRecognitionResultCallback()
Callback to clean scanned 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
-
TextPatternScannerStep
TextPatternScannerStep(String stepTag, String title, String guidanceText, String pattern, Boolean shouldMatchSubstring, TextPatternScannerStep.TextPatternScanningValidationCallback validationCallback, TextPatternScannerStep.CleanScanningResultCallback 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 and#
- 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 TextPatternScannerStep.TextPatternScanningValidationCallback getValidationCallback()
Callback for text validation.
-
getCleanRecognitionResultCallback
final TextPatternScannerStep.CleanScanningResultCallback getCleanRecognitionResultCallback()
Callback to clean scanned 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.
-
-
-
-