Class CameraConfig
-
- All Implemented Interfaces:
-
java.io.Serializable
public class CameraConfig implements Serializable
Schema for SDK Camera Configuration
-
-
Field Summary
Fields Modifier and Type Field Description public StringcaptureResolutionpublic StringpictureResolutionpublic StringdefaultCamerapublic BooleanzoomGesturepublic DoublefocalLengthpublic DoublezoomRatiopublic DoublemaxZoomRatiopublic DoublemaxFocalLengthpublic List<String>fallbackCameraspublic BooleanenableTapToFocuspublic IntegertapToFocusTimeoutMspublic BooleanenableFlipFramesLeftRightpublic BooleanenableFlipFramesTopBottom
-
Constructor Summary
Constructors Constructor Description CameraConfig()
-
Method Summary
Modifier and Type Method Description StringgetCaptureResolution()The preferred resolution for video capture (720p, 1080p, 4K). voidsetCaptureResolution(String captureResolution)The preferred resolution for video capture (720p, 1080p, 4K). StringgetPictureResolution()Deprecated - do not use! voidsetPictureResolution(String pictureResolution)Deprecated - do not use! StringgetDefaultCamera()Preferred camera to open: FRONT (front-facing), BACK (rear-facing), EXTERNAL (external rear), EXTERNAL_FRONT (external front), TELE (iOS-only; requests the telephoto lens and is honored only on devices that have one; on Android or on iOS devices without a tele lens BACK will be used). voidsetDefaultCamera(String defaultCamera)Preferred camera to open: FRONT (front-facing), BACK (rear-facing), EXTERNAL (external rear), EXTERNAL_FRONT (external front), TELE (iOS-only; requests the telephoto lens and is honored only on devices that have one; on Android or on iOS devices without a tele lens BACK will be used). BooleangetZoomGesture()This flag enables or disables the zoom gesture if supported. voidsetZoomGesture(Boolean zoomGesture)This flag enables or disables the zoom gesture if supported. DoublegetFocalLength()The focal length. voidsetFocalLength(Double focalLength)The focal length. DoublegetZoomRatio()The zoom ratio. voidsetZoomRatio(Double zoomRatio)The zoom ratio. DoublegetMaxZoomRatio()The maximum zoom ratio. voidsetMaxZoomRatio(Double maxZoomRatio)The maximum zoom ratio. DoublegetMaxFocalLength()The maximum focal length. voidsetMaxFocalLength(Double maxFocalLength)The maximum focal length. List<String>getFallbackCameras()Optional cameras to fall back if the defaultCamera is not found. voidsetFallbackCameras(List<String> fallbackCameras)Optional cameras to fall back if the defaultCamera is not found. BooleangetEnableTapToFocus()Allow user to tap on the preview to focus the camera on a specific area of the screen (also known as tap-to-focus). voidsetEnableTapToFocus(Boolean enableTapToFocus)Allow user to tap on the preview to focus the camera on a specific area of the screen (also known as tap-to-focus). IntegergetTapToFocusTimeoutMs()(Note: this functionality is experimental - use at your own risk.) Duration in milliseconds after which tap-to-focus automatically returns to continuous autofocus mode. voidsetTapToFocusTimeoutMs(Integer tapToFocusTimeoutMs)(Note: this functionality is experimental - use at your own risk.) Duration in milliseconds after which tap-to-focus automatically returns to continuous autofocus mode. BooleangetEnableFlipFramesLeftRight()(EXPERIMENTAL; Android-only) Mirrors the frame sideways (left-right) before it is processed, equivalent to a horizontal flip along the vertical axis. voidsetEnableFlipFramesLeftRight(Boolean enableFlipFramesLeftRight)(EXPERIMENTAL; Android-only) Mirrors the frame sideways (left-right) before it is processed, equivalent to a horizontal flip along the vertical axis. BooleangetEnableFlipFramesTopBottom()(EXPERIMENTAL; Android-only) Turns the frame upside down (top-bottom) before it is processed, equivalent to a vertical flip along the horizontal axis. voidsetEnableFlipFramesTopBottom(Boolean enableFlipFramesTopBottom)(EXPERIMENTAL; Android-only) Turns the frame upside down (top-bottom) before it is processed, equivalent to a vertical flip along the horizontal axis. StringtoString()inthashCode()booleanequals(Object other)-
-
Method Detail
-
getCaptureResolution
String getCaptureResolution()
The preferred resolution for video capture (720p, 1080p, 4K). This resolution is used to process images for scanning. 4K resolution is only supported for barcode scanning. (Required)
-
setCaptureResolution
void setCaptureResolution(String captureResolution)
The preferred resolution for video capture (720p, 1080p, 4K). This resolution is used to process images for scanning. 4K resolution is only supported for barcode scanning. (Required)
-
getPictureResolution
String getPictureResolution()
Deprecated - do not use! The preferred resolution for taking images (720, 720p, 1080, 1080p).
-
setPictureResolution
void setPictureResolution(String pictureResolution)
Deprecated - do not use! The preferred resolution for taking images (720, 720p, 1080, 1080p).
-
getDefaultCamera
String getDefaultCamera()
Preferred camera to open: FRONT (front-facing), BACK (rear-facing), EXTERNAL (external rear), EXTERNAL_FRONT (external front), TELE (iOS-only; requests the telephoto lens and is honored only on devices that have one; on Android or on iOS devices without a tele lens BACK will be used).
-
setDefaultCamera
void setDefaultCamera(String defaultCamera)
Preferred camera to open: FRONT (front-facing), BACK (rear-facing), EXTERNAL (external rear), EXTERNAL_FRONT (external front), TELE (iOS-only; requests the telephoto lens and is honored only on devices that have one; on Android or on iOS devices without a tele lens BACK will be used).
-
getZoomGesture
Boolean getZoomGesture()
This flag enables or disables the zoom gesture if supported.
-
setZoomGesture
void setZoomGesture(Boolean zoomGesture)
This flag enables or disables the zoom gesture if supported.
-
getFocalLength
Double getFocalLength()
The focal length.
-
setFocalLength
void setFocalLength(Double focalLength)
The focal length.
-
getZoomRatio
Double getZoomRatio()
The zoom ratio.
-
setZoomRatio
void setZoomRatio(Double zoomRatio)
The zoom ratio.
-
getMaxZoomRatio
Double getMaxZoomRatio()
The maximum zoom ratio.
-
setMaxZoomRatio
void setMaxZoomRatio(Double maxZoomRatio)
The maximum zoom ratio.
-
getMaxFocalLength
Double getMaxFocalLength()
The maximum focal length.
-
setMaxFocalLength
void setMaxFocalLength(Double maxFocalLength)
The maximum focal length.
-
getFallbackCameras
List<String> getFallbackCameras()
Optional cameras to fall back if the defaultCamera is not found.
-
setFallbackCameras
void setFallbackCameras(List<String> fallbackCameras)
Optional cameras to fall back if the defaultCamera is not found.
-
getEnableTapToFocus
Boolean getEnableTapToFocus()
Allow user to tap on the preview to focus the camera on a specific area of the screen (also known as tap-to-focus). Enabled by default.
-
setEnableTapToFocus
void setEnableTapToFocus(Boolean enableTapToFocus)
Allow user to tap on the preview to focus the camera on a specific area of the screen (also known as tap-to-focus). Enabled by default.
-
getTapToFocusTimeoutMs
Integer getTapToFocusTimeoutMs()
(Note: this functionality is experimental - use at your own risk.) Duration in milliseconds after which tap-to-focus automatically returns to continuous autofocus mode. Range: 1000-60000ms.
-
setTapToFocusTimeoutMs
void setTapToFocusTimeoutMs(Integer tapToFocusTimeoutMs)
(Note: this functionality is experimental - use at your own risk.) Duration in milliseconds after which tap-to-focus automatically returns to continuous autofocus mode. Range: 1000-60000ms.
-
getEnableFlipFramesLeftRight
Boolean getEnableFlipFramesLeftRight()
(EXPERIMENTAL; Android-only) Mirrors the frame sideways (left-right) before it is processed, equivalent to a horizontal flip along the vertical axis. The camera preview on the screen is not affected. Disabled by default. NOTE: This has no effect when pluginConfig.barcodeConfig.fastProcessMode is true.
-
setEnableFlipFramesLeftRight
void setEnableFlipFramesLeftRight(Boolean enableFlipFramesLeftRight)
(EXPERIMENTAL; Android-only) Mirrors the frame sideways (left-right) before it is processed, equivalent to a horizontal flip along the vertical axis. The camera preview on the screen is not affected. Disabled by default. NOTE: This has no effect when pluginConfig.barcodeConfig.fastProcessMode is true.
-
getEnableFlipFramesTopBottom
Boolean getEnableFlipFramesTopBottom()
(EXPERIMENTAL; Android-only) Turns the frame upside down (top-bottom) before it is processed, equivalent to a vertical flip along the horizontal axis. The camera preview on the screen is not affected. Disabled by default. NOTE: This has no effect when pluginConfig.barcodeConfig.fastProcessMode is true.
-
setEnableFlipFramesTopBottom
void setEnableFlipFramesTopBottom(Boolean enableFlipFramesTopBottom)
(EXPERIMENTAL; Android-only) Turns the frame upside down (top-bottom) before it is processed, equivalent to a vertical flip along the horizontal axis. The camera preview on the screen is not affected. Disabled by default. NOTE: This has no effect when pluginConfig.barcodeConfig.fastProcessMode is true.
-
hashCode
int hashCode()
-
-
-
-