Interface BlinkIdOverlayView
- All Known Implementing Classes:
DocumentOverlayView
,LegacyDocumentVerificationOverlayView
,ReticleOverlayView
public interface BlinkIdOverlayView
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Supported processing errors. -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
Clean up your resources here.android.view.ViewGroup
createLayout
(android.app.Activity activity, RecognizerRunnerView parentView) Inflate your custom layout here and add it to the parent viewcreateTorchController
(RecognizerRunnerView recognizerRunnerView) Return properly set-up torch controller or null if torch is handled by the activity.void
onCardDetectionUpdate
(DetectionStatus detectionStatus) Called on any update to card detection process.void
onConfigurationChanged
(int newHostScreenOrientation) Called when host's screen orientation is changed.void
Called when document is successfully classified and recognition starts.void
Called when error dialog is shown.void
Called when scanning of the first side starts.void
onGlare
(boolean hasGlare) Called on glare detection update.void
Called when user should be instructed to move closer to barcode.void
onProcessingError
(BlinkIdOverlayView.ProcessingError processingError) Called when processing error, which should be displayed to the user, occurs.long
Called when both sides are scanned.void
Called when scanning of the second side starts.void
onTorchStateChanged
(boolean torchOn) Called when torch (flashlight) state is updated.void
setMandatoryFieldsMissingTooltipText
(int[] stringRes, android.app.Activity activity) void
setRecognizerSupportsClassification
(boolean isClassificationSupported) If true, this means that recognizer supports classification andonDocumentClassified()
will be called when the document is classified.void
setScanRecognitionModeOverlay
(ScanRecognitionMode scanRecognitionMode) Sets recognition mode used for onboarding overlay resources selection.void
setShowBackSideBarcodeInstructions
(boolean shouldShow) Set whether to show additional instructions when scanning back side of the document instructing user to scan the barcode.
-
Method Details
-
createLayout
android.view.ViewGroup createLayout(@NonNull android.app.Activity activity, @NonNull RecognizerRunnerView parentView) Inflate your custom layout here and add it to the parent view- Parameters:
activity
- current activityparentView
- root view to be used as inflation parent- Returns:
- root view group of your layout
-
onConfigurationChanged
void onConfigurationChanged(int newHostScreenOrientation) Called when host's screen orientation is changed.- Parameters:
newHostScreenOrientation
- orientation code, possible values are: ActivityInfo.SCREEN_ORIENTATION_PORTRAIT, ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT, ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE and ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE
-
createTorchController
Return properly set-up torch controller or null if torch is handled by the activity.- Parameters:
recognizerRunnerView
- required for torch controller setup- Returns:
- torch controller
-
setScanRecognitionModeOverlay
Sets recognition mode used for onboarding overlay resources selection.- Parameters:
scanRecognitionMode
- required for onboarding overlay resources selection
-
onFirstSideScanStarted
void onFirstSideScanStarted()Called when scanning of the first side starts. -
onSecondSideScanStarted
void onSecondSideScanStarted()Called when scanning of the second side starts. -
onMovingCloserToBarcodeRequired
void onMovingCloserToBarcodeRequired()Called when user should be instructed to move closer to barcode. -
setRecognizerSupportsClassification
void setRecognizerSupportsClassification(boolean isClassificationSupported) If true, this means that recognizer supports classification andonDocumentClassified()
will be called when the document is classified.- Parameters:
isClassificationSupported
- true if classification is supported
-
onDocumentClassified
void onDocumentClassified()Called when document is successfully classified and recognition starts. -
onCardDetectionUpdate
Called on any update to card detection process. -
onProcessingError
Called when processing error, which should be displayed to the user, occurs.- Parameters:
processingError
- processing error type.
-
onScanSuccess
long onScanSuccess()Called when both sides are scanned. If you wish to animate success state, return delay in milliseconds and overlay controller will wait before reporting that scanning is done.- Returns:
- delay in milliseconds
-
onErrorDialogShown
void onErrorDialogShown()Called when error dialog is shown. Make sure to stop animations here. -
onGlare
void onGlare(boolean hasGlare) Called on glare detection update.- Parameters:
hasGlare
- true if glare detected
-
onTorchStateChanged
void onTorchStateChanged(boolean torchOn) Called when torch (flashlight) state is updated.- Parameters:
torchOn
-true
if torch is turned on,false
otherwise.
-
getDocumentNotSupportedDialogStrings
- Returns:
- strings to be used for error dialog shown when document is not supported
-
getRecognitionTimeoutDialogStrings
- Returns:
- strings to be used for error dialog shown when second document side can't be recognized
-
getSidesNotMatchingDialogStrings
- Returns:
- strings to be used for error dialog shown when data from the second document side doesn't match the data from the first side
-
getDataMismatchStrings
- Returns:
- strings to be used for error dialog shown when scanned document has data mismatch
-
setShowBackSideBarcodeInstructions
void setShowBackSideBarcodeInstructions(boolean shouldShow) Set whether to show additional instructions when scanning back side of the document instructing user to scan the barcode.- Parameters:
shouldShow
- true if barcode instructions should be shown
-
cleanup
void cleanup()Clean up your resources here. -
setMandatoryFieldsMissingTooltipText
void setMandatoryFieldsMissingTooltipText(int[] stringRes, android.app.Activity activity) -
getOnboardingView
-