Interface BlinkIdOverlayView

    • Method Detail

      • 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 activity
        parentView - 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

        @NonNull
        TorchController createTorchController​(@NonNull
                                              RecognizerRunnerView recognizerRunnerView)
        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
      • 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 and onDocumentClassified() 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

        void onCardDetectionUpdate​(@NonNull
                                   DetectionStatus detectionStatus)
        Called on any update to card detection process.
      • onProcessingError

        void onProcessingError​(@NonNull
                               BlinkIdOverlayView.ProcessingError processingError)
        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

        @NonNull
        RetryDialogStrings getDocumentNotSupportedDialogStrings()
        Returns:
        strings to be used for error dialog shown when document is not supported
      • getRecognitionTimeoutDialogStrings

        @NonNull
        RetryDialogStrings getRecognitionTimeoutDialogStrings()
        Returns:
        strings to be used for error dialog shown when second document side can't be recognized
      • getSidesNotMatchingDialogStrings

        @NonNull
        RetryDialogStrings 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

        @NonNull
        RetryDialogStrings 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.