Camera

Complex Camera Wrapper, for simple Camera use

open class Camera

Types

AutoFocusCallback
Link copied to clipboard
interface AutoFocusCallback
CameraState
Link copied to clipboard

Current Camera state object

open class CameraState
OnStateChangeListener
Link copied to clipboard

Camera state change Interface

interface OnStateChangeListener
Size
Link copied to clipboard

Size model

open class Size

Functions

getCameraAngleCorrection
Link copied to clipboard
open fun getCameraAngleCorrection(): Int
getCameraFacing
Link copied to clipboard

Get the current camera facing.

open fun getCameraFacing(): CameraFacing
getCurrentExifOrientation
Link copied to clipboard
open fun getCurrentExifOrientation(): Int
getFlashMode
Link copied to clipboard

Get the current FlashMode

open fun getFlashMode(): FlashMode
getState
Link copied to clipboard

Get the State of the current Camera getSettingsModel. This is a singleton

open fun getState(): Camera.CameraState
hasSceneMode
Link copied to clipboard

Check if the current state has scene mode is available.

open fun hasSceneMode(mode: String): Boolean
isAvailable
Link copied to clipboard

Check if min. 1 Camera is available.

open fun isAvailable(): Boolean
isFront
Link copied to clipboard

Check if Camera is Front Camera

open fun isFront(): Boolean
isPreviewFlipped
Link copied to clipboard
open fun isPreviewFlipped(): Boolean
onPictureTaken
Link copied to clipboard
open fun onPictureTaken(data: Array<Byte>)
setCameraFacing
Link copied to clipboard

Try to set a Camera Facing.

open fun setCameraFacing(cameraFacing: CameraFacing): CameraFacing
setFlashMode
Link copied to clipboard

Try to set a flash mode and take a fallback mode if not supported by current Camera.

open fun setFlashMode(mode: FlashMode): FlashMode
setFocus
Link copied to clipboard

* Set Camera FOCUS.

open fun setFocus(focusAreas: List<Area>)
setSceneMode
Link copied to clipboard

Try to set a Scene mode and take a fallback mode if not supported by current Camera.

open fun setSceneMode(mode: SceneMode): SceneMode
setSurface
Link copied to clipboard

Set Preview Texture

open fun setSurface(surfaceTexture: SurfaceTexture)
startPreview
Link copied to clipboard

Start the Camera Preview, this is async and will begin if the surface are set.

open fun startPreview()
stopPreview
Link copied to clipboard

Stop the Camera Preview and releaseGlContext the surface.

open fun stopPreview(release: Boolean)
takePicture
Link copied to clipboard

Take a Picture

open fun takePicture(callback: CaptureCallback)

Properties

autoFocusCallback
Link copied to clipboard
private open var autoFocusCallback: Camera.AutoFocusCallback
cameraOrientation
Link copied to clipboard
private open val cameraOrientation: Int
instance
Link copied to clipboard
private open val instance: Camera
locationProvider
Link copied to clipboard
private open var locationProvider: GPSLocationProvider
onStateChangeListener
Link copied to clipboard
private open var onStateChangeListener: Camera.OnStateChangeListener
previewCallback
Link copied to clipboard
open val previewCallback: PreviewCallback
previewSize
Link copied to clipboard
private open val previewSize: Camera.Size