CameraInterface

public interface CameraInterface

Internal use only.

An interface which defines an API for the camera used with the Gini Capture SDK.

We use this interface with the deprecated Camera API and the new Camera2 API to publish a common API for the required camera features.

Types

PreviewCallback
Link copied to clipboard
public interface PreviewCallback
Callback to receive preview images.
TapToFocusListener
Link copied to clipboard
public interface TapToFocusListener
Listener for tap to focus.

Functions

close
Link copied to clipboard
abstract void close()
Closes the camera.
disableTapToFocus
Link copied to clipboard
abstract void disableTapToFocus()
Disables tap-to-focus.
enableTapToFocus
Link copied to clipboard
abstract void enableTapToFocus(@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
abstract CompletableFuture<Booleanfocus()
Start a focus run.
getPreviewView
Link copied to clipboard
abstract View getPreviewView(@NonNull() Context context)
The view which shows the camera preview.
isFlashAvailable
Link copied to clipboard
abstract boolean isFlashAvailable()
isFlashEnabled
Link copied to clipboard
abstract boolean isFlashEnabled()
isPreviewRunning
Link copied to clipboard
abstract boolean isPreviewRunning()
Get the state of the preview.
open
Link copied to clipboard
abstract CompletableFuture<Voidopen()
Opens the first back-facing camera.
setFlashEnabled
Link copied to clipboard
abstract void setFlashEnabled(boolean enabled)
setPreviewCallback
Link copied to clipboard
abstract void setPreviewCallback(@Nullable() CameraInterface.PreviewCallback previewCallback)
Set a callback to recieve preview images from the camera.
startPreview
Link copied to clipboard
abstract CompletableFuture<VoidstartPreview()
Starts the camera preview.
stopPreview
Link copied to clipboard
abstract void stopPreview()
Stops the camera preview.
takePicture
Link copied to clipboard
abstract CompletableFuture<PhototakePicture()
Take a picture with the camera.

Inheritors

CameraController
Link copied to clipboard