ProcessCameraProviderExtKt

Added in 1.4.0

public final class ProcessCameraProviderExtKt


Summary

Public methods

static final @NonNull ProcessCameraProvider

Retrieves the ProcessCameraProvider.

Public methods

public static final @NonNull ProcessCameraProvider awaitInstance(
    @NonNull ProcessCameraProvider.Companion receiver,
    @NonNull Context context
)

Retrieves the ProcessCameraProvider.

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

Parameters
@NonNull Context context

The application context.

Returns
@NonNull 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