Package 

Class ScanbotCameraXView

  • All Implemented Interfaces:
    android.graphics.drawable.Drawable.Callback , android.view.KeyEvent.Callback , android.view.ViewManager , android.view.ViewParent , android.view.accessibility.AccessibilityEventSource , io.scanbot.sdk.ui.camera.IScanbotCameraView , io.scanbot.sdk.ui.camera.UiZoomDelegate , io.scanbot.sdk.ui.camera.util.FinderViewAttributeHandler

    
    public final class ScanbotCameraXView
    extends ConstraintLayout implements IScanbotCameraView, UiZoomDelegate, FinderViewAttributeHandler
                        

    Wrapper view for CameraX

    • Method Summary

      Modifier and Type Method Description
      final Array<Size> getSupportedPreviewSizes()
      final Unit setSupportedPreviewSizes(Array<Size> supportedPreviewSizes)
      final Array<Size> getSupportedPictureSizes()
      final Unit setSupportedPictureSizes(Array<Size> supportedPictureSizes)
      final LifecycleOwner getLifecycleOwner()
      final Unit setLifecycleOwner(LifecycleOwner lifecycleOwner)
      Long getDelayAfterFocusCompleteMs() Delay that camera will took before snap on auto focus complete called from camera core in ms.
      Unit setDelayAfterFocusCompleteMs(Long delayAfterFocusCompleteMs) Delay that camera will took before snap on auto focus complete called from camera core in ms.
      Integer getFinderViewId()
      <T extends FrameHandler> T getAttachedFrameHandler(Class<T> clazz) Check whether there is same class of FrameHandler attached to the view return object of the same class if exists otherwise null
      Unit addFrameHandler(FrameHandler frameHandler) Used to add frame handler that will be called on each next frame
      Unit removeFrameHandler(FrameHandler frameHandler) Unregisters FrameHandler.
      Unit setPreviewMode(CameraPreviewMode previewMode) Set the camera preview mode.
      Unit takePicture(Boolean acquireFocus) Takes picture.
      Unit addPictureCallback(BasePictureCallback pictureCallback) Adds callback which will be notified when picture will be taken.
      Unit removePictureCallback(BasePictureCallback pictureCallback) Removes callback, so it won't receive any further notifications.
      Unit setCameraOpenCallback(CameraOpenCallback cameraOpenCallback) Callback which will be invoked when camera will be opened
      Unit addCameraStateCallback(CameraStateCallback cameraStateCallback) Adds callback which will be notified about camera state changes.
      Unit removeCameraStateCallback(CameraStateCallback cameraStateCallback) Removes callback, so it won't receive any further notifications.
      Unit addTakePictureCallback(CameraTakePictureCallback cameraTakePictureCallback) Adds callback which will be notified about take picture operation process.
      Unit removeTakePictureCallback(CameraTakePictureCallback cameraTakePictureCallback) Removes callback, so it won't receive any further notifications.
      Unit setAutoFocusOnTouch(Boolean autoFocusOnTouch)
      Unit autoFocus() Performs auto-focus.
      Unit continuousFocus() Cancels auto-focus and performs continuous-focus.
      Unit useFlash(Boolean useFlash) Enables or disables camera flash.
      Unit lockToPortrait(Boolean lockPicture) Locks camera in portrait mode
      Unit lockToLandscape(Boolean lockPicture) Locks camera in landscape mode
      Unit unlockOrientation() Unlocks camera orientation
      Unit usePinchToZoom(Boolean usePinchToZoom) Enables/disables Pinch-to-Zoom camera functionality
      Unit setOpticalZoomLevel(Float zoomLevel) Sets current zoom by a linear zoom value ranging from 0f to 1.0f.
      Unit setOpticalZoomRange(ZoomRange zoomRange) Set custom zoom range.
      Unit setCameraModule(CameraModule cameraModule) Defines a camera module.
      final Unit setPictureSize(Size pictureSize) Set camera picture size
      final Unit setPreviewSize(Size previewSize) Set camera preview size
      Unit setUiZoomLevel(Float zoomLevel) Passes the zoom value to the dependent view
      • Methods inherited from class android.view.ViewGroup

        addExtraDataToAccessibilityNodeInfo, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, autofill, autofill, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, checkInputConnectionProxy, clearAnimation, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getContextMenuInfo, getDefaultFocusHighlightEnabled, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRevealOnFocusHint, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchDelegate, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPivotSet, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollContainer, isScrollbarFadingEnabled, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, measure, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDraw, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onOverScrolled, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideStructure, onProvideVirtualStructure, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requireViewById, resetPivot, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setAnimationMatrix, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundGravity, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setImportantForAccessibility, setImportantForAutofill, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setScrollbarFadingEnabled, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDraw
      • Methods inherited from class androidx.constraintlayout.widget.ConstraintLayout

        addChildrenForAccessibility, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawChild, drawableStateChanged, endViewTransition, findFocus, findViewsWithText, focusSearch, focusableViewAvailable, gatherTransparentRegion, getAccessibilityClassName, getChildAt, getChildCount, getChildDrawingOrder, getChildDrawingOrder, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isLayoutSuppressed, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildWithMargins, measureChildren, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onCreateDrawableState, onDescendantInvalidated, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, suppressLayout, updateViewLayout
      • Methods inherited from class io.scanbot.sdk.ui.camera.ScanbotCameraXView

        addView, applyConstraintsFromLayoutParams, checkLayoutParams, fillMetrics, forceLayout, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getDesignInformation, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOptimizationLevel, getViewById, getViewWidget, isRtl, loadLayoutDescription, onLayout, onMeasure, onViewAdded, onViewRemoved, parseLayoutDescription, removeView, requestLayout, resolveMeasuredDimension, resolveSystem, setConstraintSet, setDesignInformation, setId, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOnConstraintsChanged, setOptimizationLevel, setSelfDimensionBehaviour, setState, shouldDelayChildPressedState
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getDelayAfterFocusCompleteMs

         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

         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.

      • takePicture

         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

         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

         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

         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

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

         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

         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

         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

         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

         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

         Unit usePinchToZoom(Boolean usePinchToZoom)

        Enables/disables Pinch-to-Zoom camera functionality

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

         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

         Unit setOpticalZoomRange(ZoomRange zoomRange)

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

        Parameters:
        zoomRange - Target zoom range
      • setUiZoomLevel

         Unit setUiZoomLevel(Float zoomLevel)

        Passes the zoom value to the dependent view

        Parameters:
        zoomLevel - the new scale of the UI