# CameraInfo

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/CameraInfo.java+class:androidx.camera.core.CameraInfo) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/camera#1.0.0)

*** ** * ** ***


```
interface CameraInfo
```

<br />

*** ** * ** ***

An interface for retrieving camera information.

Applications can retrieve an instance via `https://developer.android.com/reference/kotlin/androidx/camera/core/Camera#getCameraInfo()`.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#TORCH_STRENGTH_LEVEL_UNSUPPORTED() = 0` The torch strength level when the device doesn't have a flash unit or doesn't support adjusting torch strength. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraIdentifier?` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getCameraIdentifier()()` Returns the unique, stable CameraX identifier for this camera, if available. |
| `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraSelector` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getCameraSelector()()` Returns a `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraSelector` unique to this camera. |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/camera/core/CameraState!>` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getCameraState()()` Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of the camera's state. |
| `https://developer.android.com/reference/kotlin/androidx/camera/core/ExposureState` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getExposureState()()` Returns a `https://developer.android.com/reference/kotlin/androidx/camera/core/ExposureState`. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0, fromInclusive = false) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getIntrinsicZoomRatio()()` Returns the intrinsic zoom ratio of this camera. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getLensFacing()()` Returns the lens facing of this camera. |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getLowLightBoostState()()` Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of current `https://developer.android.com/reference/kotlin/androidx/camera/core/LowLightBoostState`. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getMaxTorchStrengthLevel()()` Returns the maximum torch strength level. |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getNightModeIndicator()()` Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` which observes the night mode indicator changes. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo!>` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getPhysicalCameraInfos()()` Returns a set of physical camera `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo`s. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getSensorRotationDegrees()()` Returns the sensor rotation in degrees, relative to the device's "natural" (default) orientation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getSensorRotationDegrees(int)(relativeRotation: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the sensor rotation, in degrees, relative to the given rotation value. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/android/util/Range.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>!>` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getSupportedFrameRateRanges()()` Returns an unordered set of the frame rate ranges, in frames per second, supported by this device's AE algorithm. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/android/util/Range.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>!>` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getSupportedFrameRateRanges(androidx.camera.core.SessionConfig)(sessionConfig: https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig)` Returns an unordered set of the frame rate ranges, in frames per second, supported by this device's AE algorithm for a specific `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig`. |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getTorchState()()` Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of current `https://developer.android.com/reference/kotlin/androidx/camera/core/TorchState`. |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getTorchStrengthLevel()()` Returns the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of the torch strength level. |
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/camera/core/ZoomState!>` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getZoomState()()` Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of `https://developer.android.com/reference/kotlin/androidx/camera/core/ZoomState`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#hasFlashUnit()()` Returns if flash unit is available or not. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#isFocusMeteringSupported(androidx.camera.core.FocusMeteringAction)(action: https://developer.android.com/reference/kotlin/androidx/camera/core/FocusMeteringAction)` Returns if the given `https://developer.android.com/reference/kotlin/androidx/camera/core/FocusMeteringAction` is supported on the devices. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#isLogicalMultiCameraSupported()()` Returns if logical multi camera is supported on the device. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#isLowLightBoostSupported()()` Returns if low-light boost is supported on the device. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#isNightModeIndicatorSupported()()` Returns whether the night mode indicator is supported. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#isSessionConfigSupported(androidx.camera.core.SessionConfig)(sessionConfig: https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig)` Returns if the provided `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig` is supported by the camera. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#isTorchStrengthSupported()()` Returns if configuring torch strength is supported on the device. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/camera/core/ExperimentalZeroShutterLag https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#isZslSupported()()` Returns if `https://developer.android.com/reference/kotlin/androidx/camera/core/ImageCapture#CAPTURE_MODE_ZERO_SHUTTER_LAG()` is supported on the current device. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#mustPlayShutterSound()()` Returns whether the shutter sound must be played in accordance to regional restrictions. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/camera/core/DynamicRange!>` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#querySupportedDynamicRanges(java.util.Set<androidx.camera.core.DynamicRange>)( candidateDynamicRanges: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/camera/core/DynamicRange!> )` Returns the supported dynamic ranges of this camera from a set of candidate dynamic ranges. |

| ### Extension properties |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo.https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#(androidx.camera.core.CameraInfo).cameraCharacteristics()` Returns the `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html` from this `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo.https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#(androidx.camera.core.CameraInfo).cameraId()` Returns the Camera2 camera ID from this `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo`. |

## Constants

### TORCH_STRENGTH_LEVEL_UNSUPPORTED

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

```
const val TORCH_STRENGTH_LEVEL_UNSUPPORTED = 0: Int
```

The torch strength level when the device doesn't have a flash unit or doesn't support adjusting torch strength.

## Public functions

### getCameraIdentifier

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

```
fun getCameraIdentifier(): CameraIdentifier?
```

Returns the unique, stable CameraX identifier for this camera, if available.

For most standard CameraX implementations, this will return a non-null identifier. However, some legacy or testing implementations may not have a valid identifier, in which case this method will return `null`.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraIdentifier?` | The `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraIdentifier` for this camera, or `null` if one is not available. |

### getCameraSelector

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

```
fun getCameraSelector(): CameraSelector
```

Returns a `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraSelector` unique to this camera.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraSelector` | `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraSelector` unique to this camera. |

### getCameraState

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

```
fun getCameraState(): LiveData<CameraState!>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of the camera's state.

The `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` will be updated whenever the `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraState` changes, and can be any of the following: `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraState.Type#PENDING_OPEN`, `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraState.Type#OPENING`, `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraState.Type#OPEN`, `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraState.Type#CLOSING` and `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraState.Type#CLOSED`.

Due to the inner workings of `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData`, some reported camera states may be ignored if a newer value is posted before the observers are updated. For instance, this can occur when the camera is opening or closing, the `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraState.Type#OPENING` and `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraState.Type#CLOSING` states may not be reported to observers if they are rapidly followed by the `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraState.Type#OPEN` and `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraState.Type#CLOSED` states respectively.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://developer.android.com/reference/kotlin/androidx/camera/core/CameraState!>` | a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of the camera's state. |

### getExposureState

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

```
fun getExposureState(): ExposureState
```

Returns a `https://developer.android.com/reference/kotlin/androidx/camera/core/ExposureState`.

The `https://developer.android.com/reference/kotlin/androidx/camera/core/ExposureState` contains the current exposure related information.

### getIntrinsicZoomRatio

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

```
fun getIntrinsicZoomRatio(): @FloatRange(from = 0, fromInclusive = false) Float
```

Returns the intrinsic zoom ratio of this camera.

The intrinsic zoom ratio is defined as the ratio between the angle of view of the default camera and this camera. The default camera is the camera selected by `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraSelector#DEFAULT_FRONT_CAMERA()` or `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraSelector#DEFAULT_BACK_CAMERA()` depending on the lens facing of this camera. For example, if the default camera has angle of view 60 degrees and this camera has 30 degrees, this camera will have intrinsic zoom ratio `2.0`.

The intrinsic zoom ratio is calculated approximately based on the focal length and the sensor size. It's considered an inexact attribute of the camera and might not be hundred percent accurate when compared with the output image. Especially for the case that the camera doesn't read the whole sensor area due to cropping being applied.

The default camera is guaranteed to have intrinsic zoom ratio `1.0`. Other cameras that have intrinsic zoom ratio greater than `1.0` are considered telephoto cameras and cameras that have intrinsic zoom ratio less than `1.0` are considered ultra wide-angle cameras.

If the camera is unable to provide necessary information to resolve its intrinsic zoom ratio, it will be considered as a standard camera which has intrinsic zoom ratio `1.0`.

| Returns |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0, fromInclusive = false) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the intrinsic zoom ratio of this camera. |

### getLensFacing

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

```
fun getLensFacing(): Int
```

Returns the lens facing of this camera.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | one of `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraSelector#LENS_FACING_FRONT()` and `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraSelector#LENS_FACING_BACK()`, or `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraSelector#LENS_FACING_EXTERNAL()`. If the lens facing of the camera can not be resolved, return `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraSelector#LENS_FACING_UNKNOWN()`. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | If the device cannot return a valid lens facing value, it will throw this exception. |

### getLowLightBoostState

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

```
fun getLowLightBoostState(): LiveData<Int!>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of current `https://developer.android.com/reference/kotlin/androidx/camera/core/LowLightBoostState`.

Low-light boost can be turned on via `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraControl#enableLowLightBoostAsync(boolean)` which will trigger the change event to the returned `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData`. Apps can either get immediate value via `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData#getValue()` or observe it via `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData#observe(androidx.lifecycle.LifecycleOwner,androidx.lifecycle.Observer<? super T>)` to update low-light boost UI accordingly.

If the camera doesn't support low-light boost, then the state will always be `https://developer.android.com/reference/kotlin/androidx/camera/core/LowLightBoostState#OFF()`.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>` | a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` containing current low-light boost state. |

### getMaxTorchStrengthLevel

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

```
fun getMaxTorchStrengthLevel(): @IntRange(from = 0) Int
```

Returns the maximum torch strength level.

| Returns |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The maximum strength level, or `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#TORCH_STRENGTH_LEVEL_UNSUPPORTED()` if the device doesn't have a flash unit or doesn't support configuring torch strength. |

### getNightModeIndicator

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

```
fun getNightModeIndicator(): LiveData<Int!>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` which observes the night mode indicator changes.

The night mode indicator indicates whether the current environment conditions meet the criteria for Night Mode.

The value will be one of `https://developer.android.com/reference/kotlin/androidx/camera/core/NightModeIndicator#UNKNOWN()`, `https://developer.android.com/reference/kotlin/androidx/camera/core/NightModeIndicator#NOT_RECOMMENDED()` or `https://developer.android.com/reference/kotlin/androidx/camera/core/NightModeIndicator#RECOMMENDED()`. Meaningful values can only be reported when a camera capture session is in active state after binding `https://developer.android.com/reference/kotlin/androidx/camera/core/UseCase`s with repeating surfaces.

If the camera doesn't support night mode indicator, then the value will always be `https://developer.android.com/reference/kotlin/androidx/camera/core/NightModeIndicator#UNKNOWN()`.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>` | a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of `https://developer.android.com/reference/java/lang/Integer.html` type to observe the night mode indicator changes. |

### getPhysicalCameraInfos

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

```
fun getPhysicalCameraInfos(): (Mutable)Set<CameraInfo!>
```

Returns a set of physical camera `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo`s.

A logical camera is a grouping of two or more of those physical cameras. See [Multi-camera API](https://developer.android.com/media/camera/camera2/multi-camera)

Check `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#isLogicalMultiCameraSupported()` to see if the device is supporting physical camera or not. If the device doesn't support physical camera, empty set will be returned.

| Returns |
|---|---|
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo!>` | Set of physical camera `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo`s. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#isLogicalMultiCameraSupported()` |   |

### getSensorRotationDegrees

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

```
fun getSensorRotationDegrees(): Int
```

Returns the sensor rotation in degrees, relative to the device's "natural" (default) orientation.

See [Sensor Coordinate System](https://developer.android.com/guide/topics/sensors/sensors_overview#sensors-coords) for more information.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the sensor rotation in degrees, relative to device's "natural" (default) orientation. |

### getSensorRotationDegrees

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

```
fun getSensorRotationDegrees(relativeRotation: Int): Int
```

Returns the sensor rotation, in degrees, relative to the given rotation value.

Valid values for the relative rotation are `https://developer.android.com/reference/android/view/Surface.html#ROTATION_0` (natural), `https://developer.android.com/reference/android/view/Surface.html#ROTATION_90`, `https://developer.android.com/reference/android/view/Surface.html#ROTATION_180`, `https://developer.android.com/reference/android/view/Surface.html#ROTATION_270`.

| Parameters |
|---|---|
| `relativeRotation: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the rotation relative to which the output will be calculated. Value is one of the following: - `Surface.ROTATION_0` - `Surface.ROTATION_90` - `Surface.ROTATION_180` - `Surface.ROTATION_270` <br /> |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the sensor rotation in degrees. |

### getSupportedFrameRateRanges

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

```
fun getSupportedFrameRateRanges(): (Mutable)Set<Range<Int!>!>
```

Returns an unordered set of the frame rate ranges, in frames per second, supported by this device's AE algorithm.

These are the frame rate ranges that the AE algorithm on the device can support. When CameraX is configured to run with the camera2 implementation, this list will be derived from `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html`, though ranges may be added or removed for compatibility reasons.

There is no guarantee that these ranges can be used for every size surface or combination of use cases. If attempting to run the device using an unsupported range, there may be stability issues or the device may quietly choose another frame rate operating range. The returned set does not have any ordering guarantees. To get the guaranteed supported frame rate ranges under UseCase combination constraints, use `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getSupportedFrameRateRanges(androidx.camera.core.SessionConfig)`.

| Returns |
|---|---|
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/android/util/Range.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>!>` | The set of FPS ranges supported by the device's AE algorithm |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/video/VideoCapture.Builder#setTargetFrameRate(android.util.Range<java.lang.Integer>)` |   |

### getSupportedFrameRateRanges

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

```
fun getSupportedFrameRateRanges(sessionConfig: SessionConfig): (Mutable)Set<Range<Int!>!>
```

Returns an unordered set of the frame rate ranges, in frames per second, supported by this device's AE algorithm for a specific `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig`.

These are the frame rate ranges that the AE algorithm on the device can support when a particular `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig` is applied. This allows for querying supported frame rates based on the specific configuration of `https://developer.android.com/reference/kotlin/androidx/camera/core/UseCase`s, which might influence the available ranges.

If the provided `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig` has a target frame rate range already set (e.g., set via `https://developer.android.com/reference/kotlin/androidx/camera/video/VideoCapture.Builder#setTargetFrameRate(android.util.Range<java.lang.Integer>)`), this method will ignore that specific setting. The returned set represents all ranges the device can support under the given `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig`, irrespective of any pre-defined target frame rate within the config itself.

When CameraX is configured to run with the camera2 implementation, this list will be derived from `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES` , though ranges may be added or removed for compatibility reasons or due to constraints imposed by the `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig`.

The returned set of frame rate ranges is guaranteed to be supported with the given `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig`. An empty set will be returned if the provided `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig` is invalid. The returned set does not have any ordering guarantees.

| Parameters |
|---|---|
| `sessionConfig: https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig` | The `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig` to query supported frame rate ranges for. |

| Returns |
|---|---|
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/android/util/Range.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>!>` | The set of FPS ranges supported by the device's AE algorithm for the given session config. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig.Builder#setFrameRateRange(android.util.Range<java.lang.Integer>)` |   |

### getTorchState

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

```
fun getTorchState(): LiveData<Int!>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of current `https://developer.android.com/reference/kotlin/androidx/camera/core/TorchState`.

The torch can be turned on and off via `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraControl#enableTorch(boolean)` which will trigger the change event to the returned `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData`. Apps can either get immediate value via `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData#getValue()` or observe it via `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData#observe(androidx.lifecycle.LifecycleOwner,androidx.lifecycle.Observer<? super T>)` to update torch UI accordingly.

If the camera doesn't have a flash unit (see `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#hasFlashUnit()`), then the torch state will be `https://developer.android.com/reference/kotlin/androidx/camera/core/TorchState#OFF()`.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>` | a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` containing current torch state. |

### getTorchStrengthLevel

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

```
fun getTorchStrengthLevel(): LiveData<Int!>
```

Returns the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of the torch strength level.

The value of the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` will be the default torch strength level of this device if `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraControl#setTorchStrengthLevel(int)` hasn't been called.

The value of the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` will be `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#TORCH_STRENGTH_LEVEL_UNSUPPORTED()` if the device doesn't have a flash unit or doesn't support configuring torch strength.

### getZoomState

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

```
fun getZoomState(): LiveData<ZoomState!>
```

Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` of `https://developer.android.com/reference/kotlin/androidx/camera/core/ZoomState`.

The LiveData will be updated whenever the set zoom state has been changed. This can occur when the application updates the zoom via `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraControl#setZoomRatio(float)` or `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraControl#setLinearZoom(float)`. When a valid zoom value is set through those methods, the `https://developer.android.com/reference/kotlin/androidx/camera/core/ZoomState` value in this `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` is updated without waiting for the asynchronous camera operation to complete. The zoom state can also change anytime a camera starts up, for example when a `https://developer.android.com/reference/kotlin/androidx/camera/core/UseCase` is bound to it.

### hasFlashUnit

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

```
fun hasFlashUnit(): Boolean
```

Returns if flash unit is available or not.

### isFocusMeteringSupported

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

```
fun isFocusMeteringSupported(action: FocusMeteringAction): Boolean
```

Returns if the given `https://developer.android.com/reference/kotlin/androidx/camera/core/FocusMeteringAction` is supported on the devices.

It returns true if at least one valid AF/AE/AWB region generated by the given `https://developer.android.com/reference/kotlin/androidx/camera/core/FocusMeteringAction` is supported on the current camera. For example, on a camera supporting only AF regions, passing in a `https://developer.android.com/reference/kotlin/androidx/camera/core/FocusMeteringAction` specifying AF/AE regions to this API will still return true. But it will return false if the `https://developer.android.com/reference/kotlin/androidx/camera/core/FocusMeteringAction` specifies only the AE region since none of the specified regions are supported.

If it returns false, invoking `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraControl#startFocusAndMetering(androidx.camera.core.FocusMeteringAction)` with the given `https://developer.android.com/reference/kotlin/androidx/camera/core/FocusMeteringAction` will always fail.

### isLogicalMultiCameraSupported

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

```
fun isLogicalMultiCameraSupported(): Boolean
```

Returns if logical multi camera is supported on the device.

A logical camera is a grouping of two or more of those physical cameras. See [Multi-camera API](https://developer.android.com/media/camera/camera2/multi-camera)

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if supported, otherwise false. |

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html` | #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA |

### isLowLightBoostSupported

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

```
fun isLowLightBoostSupported(): Boolean
```

Returns if low-light boost is supported on the device. Low-light boost can be turned on via `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraControl#enableLowLightBoostAsync(boolean)`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if `https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#CONTROL_AE_MODE_ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY` is supported, otherwise false. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraControl#enableLowLightBoostAsync(boolean)` |   |
| `https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#CONTROL_AE_MODE_ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY` |   |

### isNightModeIndicatorSupported

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

```
fun isNightModeIndicatorSupported(): Boolean
```

Returns whether the night mode indicator is supported.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if `https://developer.android.com/reference/android/hardware/camera2/CaptureResult.html#EXTENSION_NIGHT_MODE_INDICATOR` is supported, otherwise false. |

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CaptureResult.html#EXTENSION_NIGHT_MODE_INDICATOR` |   |

### isSessionConfigSupported

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

```
fun isSessionConfigSupported(sessionConfig: SessionConfig): Boolean
```

Returns if the provided `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig` is supported by the camera.

This method checks if the camera can support the configuration contained within the given `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig`. This includes surfaces, features, and other parameters. It can also be used with subtypes of `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig`, such as `https://developer.android.com/reference/kotlin/androidx/camera/video/HighSpeedVideoSessionConfig` or `https://developer.android.com/reference/kotlin/androidx/camera/extensions/ExtensionSessionConfig`, to verify if those specific configurations are supported.

This API can be used before calling \`bindToLifecycle\` API to know if binding a `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig` with some given combination of feature groups will work or not.

The following pseudo-code shows an example of how to use this API:

```kotlin
// Disable the unsupported feature options in app feature menu UI once some features have
// already been selected and adding these features will lead to an unsupported configuration.
void disableUnsupportedFeatures(Set<GroupableFeature> selectedFeatures,
        Set<GroupableFeature> appFeatureOptions) {
    for (GroupableFeature featureOption : appFeatureOptions) {
        if (selectedFeatures.contains(featureOption)) { continue; }

        List<GroupableFeature> combinedFeatures = new ArrayList<>(selectedFeatures);
        combinedFeatures.add(featureOption);
        SessionConfig sessionConfig =
            new SessionConfig.Builder(useCases)
                .addRequiredFeatureGroup(combinedFeatures.toArray(new Feature[0]))
                .build();

        if (!cameraInfo.isSessionConfigSupported(sessionConfig)) {
            disableFeatureOptionInUi(featureOption); // e.g. app logic to disable a menu item
        }
    }
}
```

| Parameters |
|---|---|
| `sessionConfig: https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig` | The `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig` to be checked. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the provided `https://developer.android.com/reference/kotlin/androidx/camera/core/SessionConfig` is supported or not. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | If some features conflict with each other by having different values for the same feature type and can thus never be supported together. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/core/featuregroup/GroupableFeature` |   |

### isTorchStrengthSupported

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

```
fun isTorchStrengthSupported(): Boolean
```

Returns if configuring torch strength is supported on the device.

If supported, `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraControl#setTorchStrengthLevel(int)` can be used to configure torch strength.

If not supported, `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getMaxTorchStrengthLevel()` and `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#getTorchStrengthLevel()` will return `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo#TORCH_STRENGTH_LEVEL_UNSUPPORTED()` when called.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if configuring torch strength is supported on the device, otherwise `false`. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraControl#setTorchStrengthLevel(int)` |   |

### isZslSupported

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

```
@ExperimentalZeroShutterLag
fun isZslSupported(): Boolean
```

Returns if `https://developer.android.com/reference/kotlin/androidx/camera/core/ImageCapture#CAPTURE_MODE_ZERO_SHUTTER_LAG()` is supported on the current device.

ZERO_SHUTTER_LAG will be supported when all of the following conditions are met

- API Level \>= 23
- `https://developer.android.com/reference/android/graphics/ImageFormat.html#PRIVATE` reprocessing is supported

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if supported, otherwise false. |

### mustPlayShutterSound

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

```
java-static fun mustPlayShutterSound(): Boolean
```

Returns whether the shutter sound must be played in accordance to regional restrictions.

This method provides the general rule of playing shutter sounds. The exact requirements of playing shutter sounds may vary among regions.

For image capture, the shutter sound is recommended to be played when receiving `https://developer.android.com/reference/kotlin/androidx/camera/core/ImageCapture.OnImageCapturedCallback#onCaptureStarted()` or `https://developer.android.com/reference/kotlin/androidx/camera/core/ImageCapture.OnImageSavedCallback#onCaptureStarted()`. For video capture, it's recommended to play the start recording sound when receiving `VideoRecordEvent.Start` and the stop recording sound when receiving `VideoRecordEvent.Finalize`.

To play the system default sounds, it's recommended to use `https://developer.android.com/reference/android/media/MediaActionSound.html#play(int)`. For image capture, play `https://developer.android.com/reference/android/media/MediaActionSound.html#SHUTTER_CLICK`. For video capture, play `https://developer.android.com/reference/android/media/MediaActionSound.html#START_VIDEO_RECORDING` and `https://developer.android.com/reference/android/media/MediaActionSound.html#STOP_VIDEO_RECORDING`.

This method and `https://developer.android.com/reference/android/media/MediaActionSound.html#mustPlayShutterSound()` serve the same purpose, while this method is compatible on API level lower than `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#TIRAMISU`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if shutter sound must be played, otherwise `false`. |

### querySupportedDynamicRanges

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

```
fun querySupportedDynamicRanges(
    candidateDynamicRanges: (Mutable)Set<DynamicRange!>
): (Mutable)Set<DynamicRange!>
```

Returns the supported dynamic ranges of this camera from a set of candidate dynamic ranges.

Dynamic range specifies how the range of colors, highlights and shadows captured by the frame producer are represented on a display. Some dynamic ranges allow the preview surface to make full use of the extended range of brightness of the display.

The returned dynamic ranges are those which the camera can produce. However, because care usually needs to be taken to ensure the frames produced can be displayed correctly, the returned dynamic ranges will be limited to those passed in to `
candidateDynamicRanges`. For example, if the device display supports HLG, HDR10 and HDR10+, and you're attempting to use a UI component to receive frames from those dynamic ranges that you know will be display correctly, you would use a `
candidateDynamicRanges` set consisting of `{DynamicRange.HLG_10_BIT,
DynamicRange.HDR10_10_BIT, DynamicRange.HDR10_PLUS_10_BIT}`. If the only 10-bit/HDR `
DynamicRange` the camera can produce is `HLG_10_BIT`, then that will be the only dynamic range returned by this method given the above candidate list.

Consult the documentation of each use case to determine whether using the dynamic ranges published here are appropriate. Some use cases may have complex requirements that prohibit them from publishing a candidate list for use with this method, such as `https://developer.android.com/reference/kotlin/androidx/camera/video/Recorder`. For those cases, alternative APIs may be present for querying the supported dynamic ranges that can be set on the use case.

The dynamic ranges published as return values by this method are fully-defined. That is, the resulting set will not contain dynamic ranges such as `https://developer.android.com/reference/kotlin/androidx/camera/core/DynamicRange#UNSPECIFIED()` or `https://developer.android.com/reference/kotlin/androidx/camera/core/DynamicRange#HDR_UNSPECIFIED_10_BIT()`. However, non-fully-defined dynamic ranges can be used in `candidateDynamicRanges`, and will resolve to fully-defined dynamic ranges in the resulting set. To query all dynamic ranges the camera can produce, `
Collections.singleton(DynamicRange.UNSPECIFIED`} can be used as the candidate set.

Because SDR is always supported, including `https://developer.android.com/reference/kotlin/androidx/camera/core/DynamicRange#SDR()` in `
candidateDynamicRanges` will always result in `SDR` being present in the result set. If an empty candidate set is provided, an `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` will be thrown.

| Parameters |
|---|---|
| `candidateDynamicRanges: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/camera/core/DynamicRange!>` | a set of dynamic ranges representing the dynamic ranges the consumer of frames can support. Note that each use case may have its own requirements on which dynamic ranges it can consume based on how it is configured, and those dynamic ranges may not be published as a set of candidate dynamic ranges. In that case, this API may not be appropriate. An example of this is `https://developer.android.com/reference/kotlin/androidx/camera/video/VideoCapture`'s `https://developer.android.com/reference/kotlin/androidx/camera/video/Recorder` class, which must also take into account the dynamic ranges supported by the media codecs on the device, and the quality of the video being recorded. For that class, it is recommended to use `https://developer.android.com/reference/kotlin/androidx/camera/video/RecorderVideoCapabilities#getSupportedDynamicRanges()` instead. |

| Returns |
|---|---|
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-set/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/camera/core/DynamicRange!>` | a set of dynamic ranges supported by the camera based on the candidate dynamic ranges |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if an empty candidate dynamic range set is provided. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/core/Preview.Builder#setDynamicRange(androidx.camera.core.DynamicRange)` |   |
| `https://developer.android.com/reference/kotlin/androidx/camera/video/RecorderVideoCapabilities#getSupportedDynamicRanges()` |   |

## Extension properties

### CameraInfo.cameraCharacteristics

Artifact: [androidx.camera:camera-camera2](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/camera2/interop/Camera2InteropEx.kt+symbol:cameraCharacteristics) Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
val CameraInfo.cameraCharacteristics: CameraCharacteristics
```

Returns the `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html` from this `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if this `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo` does not contain Camera2 information |

### CameraInfo.cameraId

Artifact: [androidx.camera:camera-camera2](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/camera2/interop/Camera2InteropEx.kt+symbol:cameraId) Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
val CameraInfo.cameraId: String
```

Returns the Camera2 camera ID from this `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if this `https://developer.android.com/reference/kotlin/androidx/camera/core/CameraInfo` does not contain Camera2 information |