Interface ICameraViewConfiguration
-
- All Implemented Interfaces:
public interface ICameraViewConfiguration
Base interface to control configuration parameters of the Camera inside the Classical component View
-
-
Method Summary
Modifier and Type Method Description abstract Unit
setCameraModule(CameraModule cameraModule)
Defines a camera module. abstract Unit
setShutterSound(Boolean enabled)
Set camera shutter sound state. abstract Unit
setForceMaxSnappingSize(Boolean enabled)
Set whether camera should force maximum possible size of snapped picture or use maximum size that available with the same aspect ratio as preview by default set to false
This parameter works only withScanbotCameraXView
enabledabstract Unit
setForceMaxSnappingQuality(Boolean enabled)
Set whether camera should force maximum possible quality of snapped picture. abstract Unit
lockMinFocusDistance(Boolean lock)
Locks the min supported focus distance and disables continuous focus abstract Unit
setCameraPreviewMode(CameraPreviewMode cameraPreviewMode)
Set the camera preview mode. abstract Unit
setCameraOrientationMode(CameraOrientationMode cameraOrientationMode)
Orientation lock mode of the camera: PORTRAIT or LANDSCAPE. abstract Unit
setPhysicalZoomRatio(Float zoomRatio)
Sets current zoom ratio ranging from 0.5f to 100f. abstract Unit
setPhysicalZoomRange(ZoomRange zoomRange)
Set custom zoom range. abstract Unit
setAutoFocusOnTouch(Boolean enabled)
Whether touch-to-focus is enabled on camera preview. abstract Long
getDelayAfterFocusCompleteMs()
Delay that camera will took before snap on auto focus complete called from camera core in ms. abstract Unit
setDelayAfterFocusCompleteMs(Long delayAfterFocusCompleteMs)
Delay that camera will took before snap on auto focus complete called from camera core in ms. -
-
Method Detail
-
setCameraModule
abstract Unit setCameraModule(CameraModule cameraModule)
Defines a camera module. By default is CameraModule.BACK.
- Parameters:
cameraModule
- CameraModule to use.
-
setShutterSound
abstract Unit setShutterSound(Boolean enabled)
Set camera shutter sound state.
true
if system sound should be played on the take picture event,false
- otherwise. By default, the camera plays the system-defined camera shutter sound when takePicture() is called.Note that devices may not always allow disabling the camera shutter sound. If the shutter sound state cannot be set to the desired value, this method will be ignored.
- Parameters:
enabled
- if shutter sound enabled
-
setForceMaxSnappingSize
abstract Unit setForceMaxSnappingSize(Boolean enabled)
Set whether camera should force maximum possible size of snapped picture or use maximum size that available with the same aspect ratio as preview by default set to
false
This parameter works only withScanbotCameraXView
enabled
-
setForceMaxSnappingQuality
abstract Unit setForceMaxSnappingQuality(Boolean enabled)
Set whether camera should force maximum possible quality of snapped picture. As a result snapping speed could be significantly slower and result image could be bigger. By default set to
false
This parameter works only withScanbotCameraXView
enabled
-
lockMinFocusDistance
abstract Unit lockMinFocusDistance(Boolean lock)
Locks the min supported focus distance and disables continuous focus
- Parameters:
lock
- iftrue
minimal available focus distance will be locked,false
- otherwise Default isfalse
.
-
setCameraPreviewMode
abstract Unit setCameraPreviewMode(CameraPreviewMode cameraPreviewMode)
Set the camera preview mode. By default - CameraPreviewMode.FILL_IN.
-
setCameraOrientationMode
abstract Unit setCameraOrientationMode(CameraOrientationMode cameraOrientationMode)
Orientation lock mode of the camera: PORTRAIT or LANDSCAPE. By default the camera orientation is not locked.
-
setPhysicalZoomRatio
abstract Unit setPhysicalZoomRatio(Float zoomRatio)
Sets current zoom ratio ranging from 0.5f to 100f. Zoom Level 1f represents 1x zoom ratio. Default value is 1f.
- Parameters:
zoomRatio
- Target zoom level
-
setPhysicalZoomRange
abstract Unit setPhysicalZoomRange(ZoomRange zoomRange)
Set custom zoom range. Default value is ZoomRange(0.5f, 100f).
- Parameters:
zoomRange
- Target zoom range
-
setAutoFocusOnTouch
abstract Unit setAutoFocusOnTouch(Boolean enabled)
Whether touch-to-focus is enabled on camera preview. Enabled by default.
-
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.
-
-
-
-