Package 

Interface IScanbotCameraView

    • Method Detail

      • takePicture

         abstract Unit takePicture(Boolean acquireFocus)

        Takes picture.

        <p> This is asynchronous process, so results are reported via {@link PictureCallback} added in {@link #addPictureCallback(PictureCallback)}. If snapping process is still going all subsequent calls to {@link #takePicture(boolean)} are ignored. <p> After picture is taken, camera preview is stopped. If you wish it continue, use {@link #startPreview()} <p> If view is paused, this call is ignored.
        Parameters:
        acquireFocus - {@code true} to perform auto-focus before shooting.
      • addPictureCallback

         abstract Unit addPictureCallback(BasePictureCallback pictureCallback)

        Adds callback which will be notified when picture will be taken. Callbacks are invoked on a worker thread, so you can safely perform "heavy" operations here.

        Parameters:
        pictureCallback - callback to register.
      • addCameraStateCallback

         abstract Unit addCameraStateCallback(CameraStateCallback cameraStateCallback)

        Adds callback which will be notified about camera state changes. Callbacks are invoked on a main thread.

        Parameters:
        cameraStateCallback - callback to register.
      • addTakePictureCallback

         abstract Unit addTakePictureCallback(CameraTakePictureCallback cameraTakePictureCallback)

        Adds callback which will be notified about take picture operation process. Callbacks are invoked on a main thread.

        Parameters:
        cameraTakePictureCallback - callback to register.
      • setAutoFocusOnTouch

         abstract Unit setAutoFocusOnTouch(Boolean autoFocusOnTouch)
        Parameters:
        autoFocusOnTouch - if true - auto focus on touch will be enabled, false - otherwise.
      • autoFocus

         abstract Unit autoFocus()

        Performs auto-focus.

        If there is no auto-focus capabilities on this device, does nothing.

        If view is paused, this call is ignored.

      • continuousFocus

         abstract Unit continuousFocus()

        Cancels auto-focus and performs continuous-focus. Should be executed from the main thread and when camera is opened

        If there is no continuous-focus capabilities on this device, does auto-focus.

        If view is paused, this call is ignored.

      • useFlash

         abstract Unit useFlash(Boolean useFlash)

        Enables or disables camera flash.

        If there is no flash on this device, does nothing.

        If view is paused, this call is ignored.

        Parameters:
        useFlash - true to enable flash.
      • lockToPortrait

         abstract Unit lockToPortrait(Boolean lockPicture)

        Locks camera in portrait mode

        Parameters:
        lockPicture - if true - taken picture will ba locked to the portrait orientation, false - picture orientation depends on the device sensor.
      • lockToLandscape

         abstract Unit lockToLandscape(Boolean lockPicture)

        Locks camera in landscape mode

        Parameters:
        lockPicture - if true - taken picture will ba locked to the landscape orientation, false - picture orientation depends on the device sensor.
      • usePinchToZoom

         abstract Unit usePinchToZoom(Boolean usePinchToZoom)

        Enables/disables Pinch-to-Zoom camera functionality

        Parameters:
        usePinchToZoom - true if Pinch-to-Zoom should be enabled, false - otherwise
      • setOpticalZoomLevel

         abstract Unit setOpticalZoomLevel(Float zoomLevel)

        Sets current zoom by a linear zoom value ranging from 0f to 1.0f. Zoom Level 0f represents the minimum zoom while Zoom Level 1.0f represents the maximum zoom. Default value is 0f.

        Parameters:
        zoomLevel - Target zoom level
      • setOpticalZoomRange

         abstract Unit setOpticalZoomRange(ZoomRange zoomRange)

        Set custom zoom range. Default value is ZoomRange(0f, 1f).

        Parameters:
        zoomRange - Target zoom range
      • getDelayAfterFocusCompleteMs

         abstract Long getDelayAfterFocusCompleteMs()

        Delay that camera will took before snap on auto focus complete called from camera core in ms. For some devices this callback could call even before real auto focus completed, so we need to take some delay before snapping. Usually you can set 500ms. By default it is set to 20ms.

      • setDelayAfterFocusCompleteMs

         abstract Unit setDelayAfterFocusCompleteMs(Long delayAfterFocusCompleteMs)

        Delay that camera will took before snap on auto focus complete called from camera core in ms. For some devices this callback could call even before real auto focus completed, so we need to take some delay before snapping. Usually you can set 500ms. By default it is set to 20ms.