Camera XHandler

class CameraXHandler(    lifeCycle: LifecycleOwner,     view: PreviewView,     lensFacing: Int = CameraSelector.LENS_FACING_BACK)

Handler for CameraX purposes, it included with calculating aspect ratio for the camera. By default, it embedded with Preview use case.

Author

Jimly A.

Since

09-Sep-21

Parameters

lifeCycle

where the CameraX is being called

view

instance of PreviewView in the layout

lensFacing

Use the Lens Facing back or Front for the cameraX

Constructors

Link copied to clipboard
fun CameraXHandler(    lifeCycle: LifecycleOwner,     view: PreviewView,     lensFacing: Int = CameraSelector.LENS_FACING_BACK)

Instance of CameraXHandler

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun addUseCase(useCase: UseCase)

method to add another use case to the cameraX

Properties

Link copied to clipboard
var camera: ArrayList<Camera>

list of Use Case embedded to the CameraX

Link copied to clipboard
var cameraProvider: ProcessCameraProvider

standard provider for the camera to use

Link copied to clipboard
val rotation: Int
Link copied to clipboard
val screenAspectRatio: Int

Aspect ratio for the camera

Sources

Link copied to clipboard