Camera Interface
public interface CameraInterface
Content copied to clipboard
Internal use only.
An interface which defines an API for the camera used with the Gini Vision Library.
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
Tap To Focus Listener
Link copied to clipboard
public interface TapToFocusListener
Content copied to clipboard
Listener for tap to focus.
Functions
disable Tap To Focus
Link copied to clipboard
Disables tap-to-focus.
enable Tap To Focus
Link copied to clipboard
abstract void enableTapToFocus(@NonNull() View tapView, @Nullable() CameraInterface.TapToFocusListener listener)
Content copied to clipboard
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.
get Camera Rotation
Link copied to clipboard
abstract int getCameraRotation()
Content copied to clipboard
The rotation in degrees of the camera.
get Picture Size
Link copied to clipboard
The selected picture size for the camera.
get Preview Size
Link copied to clipboard
The selected preview size for the camera.
get Preview Size For Display
Link copied to clipboard
The selected preview size for the camera rotated to match the camera orientation.
is Flash Available
Link copied to clipboard
abstract boolean isFlashAvailable()
Content copied to clipboard
is Flash Enabled
Link copied to clipboard
abstract boolean isFlashEnabled()
Content copied to clipboard
is Preview Running
Link copied to clipboard
abstract boolean isPreviewRunning()
Content copied to clipboard
Get the state of the preview.
set Flash Enabled
Link copied to clipboard
abstract void setFlashEnabled(boolean enabled)
Content copied to clipboard
set Preview Callback
Link copied to clipboard
abstract void setPreviewCallback(@NonNull() Camera.PreviewCallback previewCallback)
Content copied to clipboard
Set a callback to recieve preview images from the camera.
start Preview
Link copied to clipboard
Starts the preview using the SurfaceHolder provided by startPreview.
@NonNull()
Content copied to clipboard
Starts the preview using the given SurfaceHolder.
stop Preview
Link copied to clipboard
abstract void stopPreview()
Content copied to clipboard
Stops the camera preview.
take Picture
Link copied to clipboard
Take a picture with the camera.
Inheritors
CameraController
Link copied to clipboard