Class TextDataScannerStep
-
- All Implemented Interfaces:
public final class TextDataScannerStepDefines a single step of the data scanning flow.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceTextDataScannerStep.GenericTextValidationCallbackCallback for text validation.
public interfaceTextDataScannerStep.CleanRecognitionResultCallbackOptional callback to clean recognized string prior to validation. Allows to increase the quality and speed of the recognition.
public classTextDataScannerStep.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 TextDataScannerStep.GenericTextValidationCallbackvalidationCallbackprivate final TextDataScannerStep.CleanRecognitionResultCallbackcleanRecognitionResultCallbackprivate final FloatpreferredZoomprivate final AspectRatioaspectRatioprivate final FloatunzoomedFinderHeightprivate final Set<Character>allowedSymbolsprivate final LongsignificantShakeDelaypublic final static TextDataScannerStep.CompanionCompanion
-
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 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 (Supports ? final BooleangetShouldMatchSubstring()Find and match only part of the whole string if the pattern is used. final TextDataScannerStep.GenericTextValidationCallbackgetValidationCallback()Callback for text validation. final TextDataScannerStep.CleanRecognitionResultCallbackgetCleanRecognitionResultCallback()Callback to clean recognized 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
-
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.
-
-
-
-