Class CameraInfo
java.lang.Object
com.codename1.camera.CameraInfo
Describes a physical camera available on the device.
Returned by Camera#getCameras() and Camera#getDefault(CameraFacing).
Instances are immutable and may be passed to Camera#open(CameraInfo, CameraSessionOptions).
-
Constructor Summary
ConstructorsConstructorDescriptionCameraInfo(String id, CameraFacing facing, Dimension[] photoSizes, Dimension[] previewSizes, boolean hasFlash, boolean hasAutoFocus) Used by platform implementations. -
Method Summary
Modifier and TypeMethodDescriptionDirection this camera faces relative to the device screen.getId()Opaque, platform-specific identifier.Supported still-photo resolutions, largest first.Supported preview/frame-stream resolutions.booleanTrue if this camera supports tap-to-focus / autofocus.booleanhasFlash()True if this camera has a flash/torch the application can drive viaCameraSession#setFlashMode(FlashMode).
-
Constructor Details
-
CameraInfo
public CameraInfo(String id, CameraFacing facing, Dimension[] photoSizes, Dimension[] previewSizes, boolean hasFlash, boolean hasAutoFocus) Used by platform implementations. Application code obtains instances throughCamera#getCameras().
-
-
Method Details
-
getId
Opaque, platform-specific identifier. Stable for the lifetime of the process. -
getFacing
Direction this camera faces relative to the device screen. -
getPhotoSizes
Supported still-photo resolutions, largest first. May be empty on platforms (e.g. the JavaSE simulator) that don't expose a discrete list. -
getPreviewSizes
Supported preview/frame-stream resolutions. May be empty on platforms that don't expose a discrete list. -
hasFlash
public boolean hasFlash()True if this camera has a flash/torch the application can drive viaCameraSession#setFlashMode(FlashMode). -
hasAutoFocus
public boolean hasAutoFocus()True if this camera supports tap-to-focus / autofocus.
-