androidx.camera.lifecycle


Classes

ProcessCameraProvider

A singleton which can be used to bind the lifecycle of cameras to any LifecycleOwner within an application's process.

Objects

Annotations

ExperimentalCameraProviderConfiguration

Denotes that the annotated method uses an experimental path for configuring a camera provider.

Extension functions summary

Extension functions

@RequiresApi(value = 21)
suspend fun ProcessCameraProvider.Companion.awaitInstance(context: Context): ProcessCameraProvider

Retrieves the ProcessCameraProvider.

This is a suspending function unlike ProcessCameraProvider.getInstance which returns a com.google.common.util.concurrent.ListenableFuture.

Parameters
context: Context

The application context.

Returns
ProcessCameraProvider

A fully initialized ProcessCameraProvider for the current process.

Throws
androidx.camera.core.InitializationException

If failed to retrieve the ProcessCameraProvider, use InitializationException.cause to get the error cause.

See also
getInstance