Interface BlinkIdOverlayView

    • Method Detail

      • createLayout

        android.view.ViewGroup createLayout​(@NonNull
                                            RecognizerRunnerView parentView)
        Inflate your custom layout here and add it to the parent view
        activity - current activity
        parentView - root view to be used as inflation parent
        root view group of your layout
      • onConfigurationChanged

        void onConfigurationChanged​(int newHostScreenOrientation)
        Called when host's screen orientation is changed.
        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

        TorchController createTorchController​(@NonNull
                                              RecognizerRunnerView recognizerRunnerView)
        Return properly set-up torch controller or null if torch is handled by the activity.
        recognizerRunnerView - required for torch controller setup
        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.
        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.
        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.
        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.
        hasGlare - true if glare detected
      • onTorchStateChanged

        void onTorchStateChanged​(boolean torchOn)
        Called when torch (flashlight) state is updated.
        torchOn - true if torch is turned on, false otherwise.
      • getDocumentNotSupportedDialogStrings

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

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

        RetryDialogStrings getSidesNotMatchingDialogStrings()
        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

        RetryDialogStrings getDataMismatchStrings()
        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.
        shouldShow - true if barcode instructions should be shown
      • cleanup

        void cleanup()
        Clean up your resources here.