CameraController

public class CameraController implements CameraInterface

Internal use only.

Constructors

CameraController
Link copied to clipboard
void CameraController(@NonNull() Activity activity)

Functions

close
Link copied to clipboard
void close()
Closes the camera.
disableTapToFocus
Link copied to clipboard
void disableTapToFocus(@NonNull() View tapView)
Disables tap-to-focus.
enableTapToFocus
Link copied to clipboard
void enableTapToFocus(@NonNull() View tapView, @Nullable() CameraInterface.TapToFocusListener listener)
Enables tap-to-focus using the given view by adding touch handling to it and transforming the touch point coordinates to the camera sensor's coordinate system.
focus
Link copied to clipboard
CompletableFuture<Booleanfocus()
Start a focus run.
getCameraRotation
Link copied to clipboard
int getCameraRotation()
The rotation in degrees of the camera.
getPictureSize
Link copied to clipboard
Size getPictureSize()
The selected picture size for the camera.
getPreviewSize
Link copied to clipboard
Size getPreviewSize()
The selected preview size for the camera.
getPreviewSizeForDisplay
Link copied to clipboard
Size getPreviewSizeForDisplay()
The selected preview size for the camera rotated to match the camera orientation.
isFlashAvailable
Link copied to clipboard
boolean isFlashAvailable()
isFlashEnabled
Link copied to clipboard
boolean isFlashEnabled()
isPreviewRunning
Link copied to clipboard
boolean isPreviewRunning()
Get the state of the preview.
open
Link copied to clipboard
CompletableFuture<Voidopen()
Opens the first back-facing camera.
setFlashEnabled
Link copied to clipboard
void setFlashEnabled(boolean enabled)
setPreviewCallback
Link copied to clipboard
void setPreviewCallback(@Nullable() Camera.PreviewCallback previewCallback)
Set a callback to recieve preview images from the camera.
startPreview
Link copied to clipboard
CompletableFuture<VoidstartPreview()
Starts the preview using the SurfaceHolder provided by startPreview.
CompletableFuture<VoidstartPreview(@NonNull() SurfaceHolder surfaceHolder)
Starts the preview using the given SurfaceHolder.
stopPreview
Link copied to clipboard
void stopPreview()
Stops the camera preview.
takePicture
Link copied to clipboard
CompletableFuture<PhototakePicture()
Take a picture with the camera.