CameraXConfig

public final class CameraXConfig
extends Object

java.lang.Object
   ↳ androidx.camera.core.CameraXConfig


A configuration for adding implementation and user-specific behavior to CameraX.

CameraXConfig provides customizable options for camera provider instances that persist for the lifetime of the provider.

An implementation of CameraXConfig can be provided by subclassing the Application object and implementing CameraXConfig.Provider. Alternatively, other methods configuration exist such as ProcessCameraProvider.configureInstance(CameraXConfig). Examples of how this is used can be found in the androidx.camera.lifecycle package.

Applications can create and use the implementation of CameraXConfig provided in androidx.camera.camera2.

Summary

Nested classes

class CameraXConfig.Builder

A builder for generating CameraXConfig objects. 

interface CameraXConfig.Provider

An interface which can be implemented to provide the configuration for CameraX. 

Public methods

CameraSelector getAvailableCamerasLimiter(CameraSelector valueIfMissing)

Returns the CameraSelector used to determine the available cameras.

Executor getCameraExecutor(Executor valueIfMissing)

Returns the camera executor which CameraX will use to drive the camera stack.

int getMinimumLoggingLevel()

Returns the minimum logging level to be used for CameraX logs.

Handler getSchedulerHandler(Handler valueIfMissing)

Returns the scheduling handler that CameraX will use internally for scheduling future tasks.

Inherited methods

Public methods

getAvailableCamerasLimiter

public CameraSelector getAvailableCamerasLimiter (CameraSelector valueIfMissing)

Returns the CameraSelector used to determine the available cameras.

Parameters
valueIfMissing CameraSelector

Returns
CameraSelector

getCameraExecutor

public Executor getCameraExecutor (Executor valueIfMissing)

Returns the camera executor which CameraX will use to drive the camera stack.

Parameters
valueIfMissing Executor

Returns
Executor

getMinimumLoggingLevel

public int getMinimumLoggingLevel ()

Returns the minimum logging level to be used for CameraX logs.

Returns
int

getSchedulerHandler

public Handler getSchedulerHandler (Handler valueIfMissing)

Returns the scheduling handler that CameraX will use internally for scheduling future tasks.

Parameters
valueIfMissing Handler

Returns
Handler