Camera1Manager

Constructors

Link copied to clipboard
@UiThread
constructor(@NonNull context: Context, @NonNull accelManager: AccelerometerManager, @NonNull cameraStrategyFactory: ICameraStrategyFactory, @NonNull cameraDelegate: CameraListener, @NonNull settings: CameraSettings)
Constructor

Functions

Link copied to clipboard
@UiThread
open fun cameraSupportsTorch(): Boolean
Link copied to clipboard
Link copied to clipboard
@UiThread
open fun dispose()
Link copied to clipboard
Link copied to clipboard
@Nullable
open fun getCurrentPreviewSize(): ImageSize
Link copied to clipboard
Return the type of currently opened camera.
Link copied to clipboard
@NonNull
open fun getSurfaceWrapper(): SurfaceWrapper
Link copied to clipboard
@Nullable
open fun isAutofocusSupported(): Boolean
Returns true if opened camera supports autofocus.
Link copied to clipboard
@UiThread
open fun isCameraFocusing(): Boolean
Link copied to clipboard
@UiThread
open fun isCameraInFocus(): Boolean
Link copied to clipboard
@UiThread
open fun isDeviceShaking(): Boolean
Link copied to clipboard
Link copied to clipboard
@UiThread
open fun performAutofocus()
Will perform an autofocus, if supported by camera.
Link copied to clipboard
open fun recycleFrame(@NonNull frame: Camera1AbstractFrame)
Link copied to clipboard
@UiThread
open fun rotateCameraPreview(rotationDegrees: Int)
Link copied to clipboard
@UiThread
open fun setMeteringAreas(@Nullable areas: Array<Rect>)
Link copied to clipboard
@UiThread
open fun setShakeCallback(@NonNull shakeCallback: ShakeCallback)
Link copied to clipboard
@UiThread
open fun setTorchState(on: Boolean, @NonNull successCallback: SuccessCallback)
Enable/disable torch on camera.
Link copied to clipboard
@UiThread
open fun setZoomLevel(zoomLevel: Float)
Link copied to clipboard
@UiThread
open fun startPreview(@NonNull context: Context, @NonNull factorySettings: CameraSettings, @NonNull cameraStartupCallback: ICameraManager.CameraStartupCallback)
This method should be called on resuming the activity.
Link copied to clipboard
@UiThread
open fun stopPreview()
This method should be called on pausing the activity.