# ProcessCameraProviderExtKt

Added in 1.4.0

*** ** * ** ***

<br />

```
public final class ProcessCameraProviderExtKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/lifecycle/ProcessCameraProvider` | `https://developer.android.com/reference/androidx/camera/lifecycle/ProcessCameraProviderExtKt#(androidx.camera.lifecycle.ProcessCameraProvider.Companion).awaitInstance(android.content.Context)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/lifecycle/ProcessCameraProvider.Companion receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context )` Retrieves the `https://developer.android.com/reference/androidx/camera/lifecycle/ProcessCameraProvider`. |

## Public methods

### awaitInstance

Artifact: [androidx.camera:camera-lifecycle](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/lifecycle/ProcessCameraProviderExt.kt+function:awaitInstance)

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

Retrieves the `https://developer.android.com/reference/androidx/camera/lifecycle/ProcessCameraProvider`.

This is a suspending function unlike `https://developer.android.com/reference/androidx/camera/lifecycle/ProcessCameraProvider#getInstance(android.content.Context)` which returns a `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context` | The application context. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/lifecycle/ProcessCameraProvider` | A fully initialized ProcessCameraProvider for the current process. |

| Throws |
|---|---|
| `https://developer.android.com/reference/androidx/camera/core/InitializationException` | If failed to retrieve the ProcessCameraProvider, use `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/cause.html` to get the error cause. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/lifecycle/ProcessCameraProvider#getInstance(android.content.Context)` |   |