CameraXConfig
class 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 configureInstance. 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.
| See also | |
|---|---|
configureInstance |
|
CameraXConfig.Builder |
Summary
Nested types |
|---|
class CameraXConfig.BuilderA builder for generating |
interface CameraXConfig.ProviderAn interface which can be implemented to provide the configuration for CameraX. |
Public functions |
|
|---|---|
CameraSelector? |
getAvailableCamerasLimiter(valueIfMissing: CameraSelector?)Returns the |
Executor? |
getCameraExecutor(valueIfMissing: Executor?)Returns the camera executor which CameraX will use to drive the camera stack. |
Long |
Returns the camera open retry maximum timeout in milliseconds when in active resuming mode. |
RetryPolicy |
Retrieves the |
Int |
Returns the minimum logging level to be used for CameraX logs. |
Handler? |
getSchedulerHandler(valueIfMissing: Handler?)Returns the scheduling handler that CameraX will use internally for scheduling future tasks. |
Public functions
getAvailableCamerasLimiter
fun getAvailableCamerasLimiter(valueIfMissing: CameraSelector?): CameraSelector?
Returns the CameraSelector used to determine the available cameras.
| See also | |
|---|---|
setAvailableCamerasLimiter |
getCameraExecutor
fun getCameraExecutor(valueIfMissing: Executor?): Executor?
Returns the camera executor which CameraX will use to drive the camera stack.
| See also | |
|---|---|
setCameraExecutor |
getCameraOpenRetryMaxTimeoutInMillisWhileResuming
fun getCameraOpenRetryMaxTimeoutInMillisWhileResuming(): Long
Returns the camera open retry maximum timeout in milliseconds when in active resuming mode.
If this value is not set, -1L will be returned by default.
getCameraProviderInitRetryPolicy
@ExperimentalRetryPolicy
fun getCameraProviderInitRetryPolicy(): RetryPolicy
Retrieves the RetryPolicy for the CameraProvider initialization. This policy determines whether to retry the CameraProvider initialization if it fails.
| Returns | |
|---|---|
RetryPolicy |
The |
| See also | |
|---|---|
setCameraProviderInitRetryPolicy |
getMinimumLoggingLevel
fun getMinimumLoggingLevel(): Int
Returns the minimum logging level to be used for CameraX logs.
| See also | |
|---|---|
setMinimumLoggingLevel |
getSchedulerHandler
fun getSchedulerHandler(valueIfMissing: Handler?): Handler?
Returns the scheduling handler that CameraX will use internally for scheduling future tasks.
| See also | |
|---|---|
setSchedulerHandler |