Interface BaseCameraEventsListener

All Superinterfaces:
AutofocusListener
All Known Subinterfaces:
CameraEventsListener

@MainThread public interface BaseCameraEventsListener extends AutofocusListener
  • Method Details

    • onCameraPreviewStarted

      void onCameraPreviewStarted()
      Called just after camera preview has successfully started and no exceptions occurred. When this method is called, it means that from now on, frames will arrive and preview will be shown.
    • onCameraPreviewStopped

      void onCameraPreviewStopped()
      Called inside pause method of CameraView just haver camera preview has been stopped. After this method is called, frames will no longer arrive nor will be shown.
    • onError

      void onError(@NonNull Throwable exc)
      Called when recognition results with exception. Known exceptions that can occur are following: * com.microblink.blinkid.hardware.camera.CameraResolutionTooSmallException is thrown when largest possible camera preview resolution is not enough for making a successful scan * java.lang.UnsatisfiedLinkError is thrown when native library was not successfully loaded thus making scans impossible * com.microblink.blinkid.recognition.RecognizerError is thrown when initialization or reinitialization of native recognizer fails * com.microblink.blinkid.recognition.FeatureNotSupportedException is thrown when scanning cannot be performed. The reason why scanning cannot be perfomed can be obtained by calling getReason() method of thrown exception. * java.lang.Throwable is thrown in all other cases (for example when camera is not ready because it is used by other apps or some unknown error has occurred)
      Parameters:
      exc - Exception that occurred during recognition.