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 String
captureResolution
public String
pictureResolution
public String
defaultCamera
public Boolean
zoomGesture
public Double
focalLength
public Double
zoomRatio
public Double
maxZoomRatio
public Double
maxFocalLength
public List<String>
fallbackCameras
public Boolean
enableTapToFocus
public Integer
tapToFocusTimeoutMs
public Boolean
enableFlipFramesLeftRight
public Boolean
enableFlipFramesTopBottom
-
Constructor Summary
Constructors Constructor Description CameraConfig()
-
Method Summary
Modifier and Type Method Description String
getCaptureResolution()
The preferred resolution for video capture (720p, 1080p, 4K). void
setCaptureResolution(String captureResolution)
The preferred resolution for video capture (720p, 1080p, 4K). String
getPictureResolution()
Deprecated - do not use! void
setPictureResolution(String pictureResolution)
Deprecated - do not use! 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). 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). Boolean
getZoomGesture()
This flag enables or disables the zoom gesture if supported. void
setZoomGesture(Boolean zoomGesture)
This flag enables or disables the zoom gesture if supported. Double
getFocalLength()
The focal length. void
setFocalLength(Double focalLength)
The focal length. Double
getZoomRatio()
The zoom ratio. void
setZoomRatio(Double zoomRatio)
The zoom ratio. Double
getMaxZoomRatio()
The maximum zoom ratio. void
setMaxZoomRatio(Double maxZoomRatio)
The maximum zoom ratio. Double
getMaxFocalLength()
The maximum focal length. void
setMaxFocalLength(Double maxFocalLength)
The maximum focal length. List<String>
getFallbackCameras()
Optional cameras to fall back if the defaultCamera is not found. void
setFallbackCameras(List<String> fallbackCameras)
Optional cameras to fall back if the defaultCamera is not found. 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). 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). 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. 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. Boolean
getEnableFlipFramesLeftRight()
(EXPERIMENTAL; Android-only) Mirrors the frame sideways (left-right) before it is processed, equivalent to a horizontal flip along the vertical axis. 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. 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. 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. String
toString()
int
hashCode()
boolean
equals(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()
-
-
-
-