Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# CameraInfo

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/android/hardware/Camera.CameraInfo "View this page in Java")

```
open class CameraInfo
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.hardware.Camera.CameraInfo](https://developer.android.com/reference/kotlin/android/hardware/Camera.CameraInfo#) |

*** ** * ** ***

> [!CAUTION]
> **This class was deprecated in API level 21.**
>
> We recommend using the new `https://developer.android.com/reference/kotlin/android/hardware/camera2/package-summary` API for new applications.

Information about a camera

## Summary

| Constants ||
|---|---|
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/hardware/Camera.CameraInfo#CAMERA_FACING_BACK:kotlin.Int` The facing of the camera is opposite to that of the screen. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/hardware/Camera.CameraInfo#CAMERA_FACING_FRONT:kotlin.Int` The facing of the camera is the same as that of the screen. |

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/hardware/Camera.CameraInfo#CameraInfo()()` <br /> |

| Properties ||
|---|---|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/hardware/Camera.CameraInfo#canDisableShutterSound:kotlin.Boolean` Whether the shutter sound can be disabled. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/hardware/Camera.CameraInfo#facing:kotlin.Int` The direction that the camera faces. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/hardware/Camera.CameraInfo#orientation:kotlin.Int` The orientation of the camera image. |

## Constants

### CAMERA_FACING_BACK

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val CAMERA_FACING_BACK: Int
```

**Deprecated:** *Deprecated in Java.*

The facing of the camera is opposite to that of the screen.

    Value: 0

### CAMERA_FACING_FRONT

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val CAMERA_FACING_FRONT: Int
```

**Deprecated:** *Deprecated in Java.*

The facing of the camera is the same as that of the screen.

    Value: 1

## Public constructors

### CameraInfo

```
CameraInfo()
```

## Properties

### canDisableShutterSound

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
var canDisableShutterSound: Boolean
```

**Deprecated:** *Deprecated in Java.*

Whether the shutter sound can be disabled.

On some devices, the camera shutter sound cannot be turned off through `https://developer.android.com/reference/kotlin/android/hardware/Camera#enableShutterSound(kotlin.Boolean)`. This field can be used to determine whether a call to disable the shutter sound will succeed.

If this field is set to true, then a call of `enableShutterSound(false)` will be successful. If set to false, then that call will fail, and the shutter sound will be played when android.hardware.Camera#takePicture is called.

### facing

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
var facing: Int
```

**Deprecated:** *Deprecated in Java.*

The direction that the camera faces. It should be CAMERA_FACING_BACK or CAMERA_FACING_FRONT.

### orientation

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
var orientation: Int
```

**Deprecated:** *Deprecated in Java.*

The orientation of the camera image. The value is the angle that the camera image needs to be rotated clockwise so it shows correctly on the display in its natural orientation. It should be 0, 90, 180, or 270.

For example, suppose a device has a naturally tall screen. The back-facing camera sensor is mounted in landscape. You are looking at the screen. If the top side of the camera sensor is aligned with the right edge of the screen in natural orientation, the value should be 90. If the top side of a front-facing camera sensor is aligned with the right of the screen, the value should be 270.
**See Also**

- `https://developer.android.com/reference/kotlin/android/hardware/Camera#setDisplayOrientation(kotlin.Int)`
- `https://developer.android.com/reference/kotlin/android/hardware/Camera.Parameters#setRotation(kotlin.Int)`
- `https://developer.android.com/reference/kotlin/android/hardware/Camera.Parameters#setPreviewSize(kotlin.Int,%20kotlin.Int)`
- `https://developer.android.com/reference/kotlin/android/hardware/Camera.Parameters#setPictureSize(kotlin.Int,%20kotlin.Int)`
- `https://developer.android.com/reference/kotlin/android/hardware/Camera.Parameters#setJpegThumbnailSize(kotlin.Int,%20kotlin.Int)`