Class ReticleOverlayView

    • Constructor Detail

      • ReticleOverlayView

        public ReticleOverlayView​(boolean shouldShowControlButtons,
                                  boolean shouldShowFlashlightWarning,
                                  @Nullable
                                  ReticleOverlayStrings strings,
                                  @StyleRes
                                  int style)
    • Method Detail

      • createLayout

        public android.view.ViewGroup createLayout​(@NonNull
                                                   android.app.Activity activity,
                                                   @NonNull
                                                   RecognizerRunnerView recognizerRunnerView)
        Description copied from interface: BlinkIdOverlayView
        Inflate your custom layout here and add it to the parent view
        Specified by:
        createLayout in interface BlinkIdOverlayView
        Parameters:
        activity - current activity
        recognizerRunnerView - root view to be used as inflation parent
        Returns:
        root view group of your layout
      • onConfigurationChanged

        public void onConfigurationChanged​(int newHostScreenOrientation)
        Description copied from interface: BlinkIdOverlayView
        Called when host's screen orientation is changed.
        Specified by:
        onConfigurationChanged in interface BlinkIdOverlayView
        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
      • onScanSuccess

        public long onScanSuccess()
        Description copied from interface: BlinkIdOverlayView
        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.
        Specified by:
        onScanSuccess in interface BlinkIdOverlayView
        Returns:
        delay in milliseconds
      • detectionStatusToReticleState

        protected android.util.Pair<ReticleUiState,​java.lang.String> detectionStatusToReticleState​(DetectionStatus detectionStatus)
      • onGlare

        public void onGlare​(boolean hasGlare)
        Description copied from interface: BlinkIdOverlayView
        Called on glare detection update.
        Specified by:
        onGlare in interface BlinkIdOverlayView
        Parameters:
        hasGlare - true if glare detected
      • onTorchStateChanged

        public void onTorchStateChanged​(boolean torchOn)
        Description copied from interface: BlinkIdOverlayView
        Called when torch (flashlight) state is updated.
        Specified by:
        onTorchStateChanged in interface BlinkIdOverlayView
        Parameters:
        torchOn - true if torch is turned on, false otherwise.
      • setShowBackSideBarcodeInstructions

        public void setShowBackSideBarcodeInstructions​(boolean shouldShow)
        Description copied from interface: BlinkIdOverlayView
        Set whether to show additional instructions when scanning back side of the document instructing user to scan the barcode.
        Specified by:
        setShowBackSideBarcodeInstructions in interface BlinkIdOverlayView
        Parameters:
        shouldShow - true if barcode instructions should be shown
      • changeStateIfRequired

        public void changeStateIfRequired​(@NonNull
                                          ReticleUiState newState,
                                          java.lang.String statusMessage)
      • changeState

        public void changeState​(@NonNull
                                ReticleUiState newState,
                                java.lang.String statusMessage)
      • shouldStayInCurrentState

        protected boolean shouldStayInCurrentState​(ReticleUiState newState)
      • currentStateDuration

        protected long currentStateDuration()