# Camera

Artifact: [androidx.camera:camera-core](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/core/Camera.java+class:androidx.camera.core.Camera) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/camera#1.0.0)

*** ** * ** ***

<br />

```
public interface Camera
```

<br />

*** ** * ** ***

The camera interface is used to control the flow of data to use cases, control the camera via the `https://developer.android.com/reference/androidx/camera/core/CameraControl`, and publish the state of the camera via `https://developer.android.com/reference/androidx/camera/core/CameraInfo`.

`https://developer.android.com/reference/androidx/camera/lifecycle/ProcessCameraProvider#bindToLifecycle(androidx.lifecycle.LifecycleOwner,androidx.camera.core.CameraSelector,androidx.camera.core.UseCase...)` of how to obtain an instance of this class can be found in the `https://developer.android.com/reference/androidx/camera/lifecycle/package-summary` package.

## Summary

| ### Public methods |
|---|---|
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/camera/core/CameraControl` | `https://developer.android.com/reference/androidx/camera/core/Camera#getCameraControl()()` Returns the `https://developer.android.com/reference/androidx/camera/core/CameraControl` for the `https://developer.android.com/reference/androidx/camera/core/Camera`. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/camera/core/CameraInfo` | `https://developer.android.com/reference/androidx/camera/core/Camera#getCameraInfo()()` Returns information about this camera. |

## Public methods

### getCameraControl

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/camera#1.0.0)

```
abstract @NonNull CameraControl getCameraControl()
```

Returns the `https://developer.android.com/reference/androidx/camera/core/CameraControl` for the `https://developer.android.com/reference/androidx/camera/core/Camera`.

The `https://developer.android.com/reference/androidx/camera/core/CameraControl` provides various asynchronous operations like zoom, focus and metering. `https://developer.android.com/reference/androidx/camera/core/CameraControl` is ready to start operations immediately after use cases are bound to the `https://developer.android.com/reference/androidx/camera/core/Camera`. When all `https://developer.android.com/reference/androidx/camera/core/UseCase`s are unbound, or when camera is closing or closed because lifecycle onStop happens, the `https://developer.android.com/reference/androidx/camera/core/CameraControl` will reject all operations.

Each method of `https://developer.android.com/reference/androidx/camera/core/CameraControl` returns a `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` which apps can use to check the asynchronous result. If the operation is not allowed in current state, the returned `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` will fail immediately with `https://developer.android.com/reference/androidx/camera/core/CameraControl.OperationCanceledException`.

### getCameraInfo

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/camera#1.0.0)

```
abstract @NonNull CameraInfo getCameraInfo()
```

Returns information about this camera.

The returned information can be used to query static camera characteristics or observe the runtime state of the camera.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/camera/core/CameraInfo` | the `https://developer.android.com/reference/androidx/camera/core/CameraInfo`. |