Class TextPatternScannerStep
-
- All Implemented Interfaces:
public final class TextPatternScannerStepDefines a single step of the data scanning flow.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceTextPatternScannerStep.TextPatternScanningValidationCallbackCallback for the scanned text validation.
public interfaceTextPatternScannerStep.CleanScanningResultCallbackOptional callback to clean scanned string prior to validation. Allows to increase the quality and speed of the scanning.
public classTextPatternScannerStep.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static LongSIGNIFICANT_DELAY_DEFAULTpublic final static FloatDEFAULT_FINDER_HEIGHTprivate final StringstepTagprivate final Stringtitleprivate final StringguidanceTextprivate final Stringpatternprivate final BooleanshouldMatchSubstringprivate final TextPatternScannerStep.TextPatternScanningValidationCallbackvalidationCallbackprivate final TextPatternScannerStep.CleanScanningResultCallbackcleanRecognitionResultCallbackprivate final FloatpreferredZoomprivate final AspectRatioaspectRatioprivate final FloatunzoomedFinderHeightprivate final Set<Character>allowedSymbolsprivate final LongsignificantShakeDelaypublic final static TextPatternScannerStep.CompanionCompanion
-
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 StringgetStepTag()The tag of the scanning step to make. final StringgetTitle()Title for a value. final StringgetGuidanceText()User guidance for the step. final StringgetPattern()Sets a validation pattern. final BooleangetShouldMatchSubstring()Find and match only part of the whole string if the pattern is used. final TextPatternScannerStep.TextPatternScanningValidationCallbackgetValidationCallback()Callback for text validation. final TextPatternScannerStep.CleanScanningResultCallbackgetCleanRecognitionResultCallback()Callback to clean scanned string prior to validation. final FloatgetPreferredZoom()Zoom level required for this step. final AspectRatiogetAspectRatio()Aspect ratio for the step. final FloatgetUnzoomedFinderHeight()Height of the finder when view "unzoomed" (for zoom-level 1.0). final Set<Character>getAllowedSymbols()Allowed symbols to be detected. final LonggetSignificantShakeDelay()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.
-
-
-
-