Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/hardware/camera2/CameraManager#nestedclasses) \| [Methods](https://developer.android.com/reference/android/hardware/camera2/CameraManager#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/hardware/camera2/CameraManager#inhmethods)

# CameraManager

*** ** * ** ***

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


`
public

final

class
CameraManager
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.hardware.camera2.CameraManager |

<br />

*** ** * ** ***

<br />

A system service manager for detecting, characterizing, and connecting to
`https://developer.android.com/reference/android/hardware/camera2/CameraDevice`.

For more details about communicating with camera devices, read the Camera
developer guide or the `https://developer.android.com/reference/android/hardware/camera2/package-summary`
package documentation.

<br />

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback` A callback for camera devices becoming available or unavailable to open. |
| ` class` | `https://developer.android.com/reference/android/hardware/camera2/CameraManager.TorchCallback` A callback for camera flash torch modes becoming unavailable, disabled, or enabled. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraCharacteristics(java.lang.String)(https://developer.android.com/reference/java/lang/String cameraId) ` <br /> Query the capabilities of a camera device. |
| ` https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraDeviceSetup(java.lang.String)(https://developer.android.com/reference/java/lang/String cameraId) ` Returns a `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup` object for the given `cameraId`, which provides limited access to CameraDevice setup and query functionality without requiring an `https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)` call. |
| ` https://developer.android.com/reference/android/hardware/camera2/CameraExtensionCharacteristics` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraExtensionCharacteristics(java.lang.String)(https://developer.android.com/reference/java/lang/String cameraId) ` <br /> Query the camera extension capabilities of a camera device. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()() ` Return the list of currently connected camera devices by identifier, including cameras that may be in use by other camera API clients. |
| ` https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>>` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#getConcurrentCameraIds()() ` Return the set of combinations of currently connected camera device identifiers, which support configuring camera device sessions concurrently. |
| ` int` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#getTorchStrengthLevel(java.lang.String)(https://developer.android.com/reference/java/lang/String cameraId) ` Returns the brightness level of the flash unit associated with the cameraId. |
| ` boolean` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#isCameraDeviceSetupSupported(java.lang.String)(https://developer.android.com/reference/java/lang/String cameraId) ` Checks a Camera Device's characteristics to ensure that a `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup` instance can be constructed for a given `cameraId`. |
| ` boolean` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#isConcurrentSessionConfigurationSupported(java.util.Map<java.lang.String,android.hardware.camera2.params.SessionConfiguration>)(https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/java/lang/String, https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration> cameraIdAndSessionConfig) ` Checks whether the provided set of camera devices and their corresponding `https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration` can be configured concurrently. |
| ` void` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)(https://developer.android.com/reference/java/lang/String cameraId, https://developer.android.com/reference/android/hardware/camera2/CameraDevice.StateCallback callback, https://developer.android.com/reference/android/os/Handler handler) ` Open a connection to a camera with the given ID. |
| ` void` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20java.util.concurrent.Executor,%20android.hardware.camera2.CameraDevice.StateCallback)(https://developer.android.com/reference/java/lang/String cameraId, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/hardware/camera2/CameraDevice.StateCallback callback) ` Open a connection to a camera with the given ID. |
| ` void` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#registerAvailabilityCallback(java.util.concurrent.Executor,%20android.hardware.camera2.CameraManager.AvailabilityCallback)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback callback) ` Register a callback to be notified about camera device availability. |
| ` void` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#registerAvailabilityCallback(android.hardware.camera2.CameraManager.AvailabilityCallback,%20android.os.Handler)(https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback callback, https://developer.android.com/reference/android/os/Handler handler) ` Register a callback to be notified about camera device availability. |
| ` void` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#registerTorchCallback(java.util.concurrent.Executor,%20android.hardware.camera2.CameraManager.TorchCallback)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/hardware/camera2/CameraManager.TorchCallback callback) ` Register a callback to be notified about torch mode status. |
| ` void` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#registerTorchCallback(android.hardware.camera2.CameraManager.TorchCallback,%20android.os.Handler)(https://developer.android.com/reference/android/hardware/camera2/CameraManager.TorchCallback callback, https://developer.android.com/reference/android/os/Handler handler) ` Register a callback to be notified about torch mode status. |
| ` void` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#setTorchMode(java.lang.String,%20boolean)(https://developer.android.com/reference/java/lang/String cameraId, boolean enabled) ` Set the flash unit's torch mode of the camera of the given ID without opening the camera device. |
| ` void` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#turnOnTorchWithStrengthLevel(java.lang.String,%20int)(https://developer.android.com/reference/java/lang/String cameraId, int torchStrength) ` Set the brightness level of the flashlight associated with the given cameraId in torch mode. |
| ` void` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#unregisterAvailabilityCallback(android.hardware.camera2.CameraManager.AvailabilityCallback)(https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback callback) ` Remove a previously-added callback; the callback will no longer receive connection and disconnection callbacks. |
| ` void` | ` https://developer.android.com/reference/android/hardware/camera2/CameraManager#unregisterTorchCallback(android.hardware.camera2.CameraManager.TorchCallback)(https://developer.android.com/reference/android/hardware/camera2/CameraManager.TorchCallback callback) ` Remove a previously-added callback; the callback will no longer receive torch mode status callbacks. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Public methods

### getCameraCharacteristics

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

```
public CameraCharacteristics getCameraCharacteristics (String cameraId)
```

<br />

Query the capabilities of a camera device. These capabilities are
immutable for a given camera.

From API level 29, this function can also be used to query the capabilities of physical
cameras that can only be used as part of logical multi-camera. These cameras cannot be
opened directly via `https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)`

Also starting with API level 29, while most basic camera information is still available
even without the CAMERA permission, some values are not available to apps that do not hold
that permission. The keys not available are listed by
`https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#getKeysNeedingPermission()`.

<br />

<br />

| Parameters ||
|---|---|
| `cameraId` | `String`: The id of the camera device to query. This could be either a standalone camera ID which can be directly opened by `https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)`, or a physical camera ID that can only used as part of a logical multi-camera. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics` | The properties of the given camera. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException` | if the camera device has been disconnected. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the cameraId does not match any known camera device. |

**See also:**

- `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setCameraDisabled(android.content.ComponentName,%20boolean)`

### getCameraDeviceSetup

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

```
public CameraDevice.CameraDeviceSetup getCameraDeviceSetup (String cameraId)
```

Returns a `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup` object for the given `cameraId`,
which provides limited access to CameraDevice setup and query functionality without
requiring an `https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)` call. The `https://developer.android.com/reference/android/hardware/camera2/CameraDevice` can later be obtained either
by calling `https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)`, or `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup#openCamera(java.util.concurrent.Executor,%20android.hardware.camera2.CameraDevice.StateCallback)`.

Support for `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup` for a given `cameraId` must be
checked with `https://developer.android.com/reference/android/hardware/camera2/CameraManager#isCameraDeviceSetupSupported(java.lang.String)`. If `isCameraDeviceSetupSupported`
returns `false` for a `cameraId`, this method will throw an
`https://developer.android.com/reference/java/lang/UnsupportedOperationException`

<br />

<br />

| Parameters ||
|---|---|
| `cameraId` | `String`: The unique identifier of the camera device for which `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup` object must be constructed. This identifier must be present in `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()` This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup` | `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup` object corresponding to the provided `cameraId` This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException` | if the camera device is not accessible |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If `cameraId` is null, or if `cameraId` does not match any device in `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()`. |
| `https://developer.android.com/reference/java/lang/UnsupportedOperationException` | if `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup` instance cannot be constructed for the given `cameraId`, i.e. `https://developer.android.com/reference/android/hardware/camera2/CameraManager#isCameraDeviceSetupSupported(java.lang.String)` returns false. |

**See also:**

- `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup`
- `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()`
- `https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)`

### getCameraExtensionCharacteristics

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

```
public CameraExtensionCharacteristics getCameraExtensionCharacteristics (String cameraId)
```

<br />

Query the camera extension capabilities of a camera device.

<br />

<br />

| Parameters ||
|---|---|
| `cameraId` | `String`: The id of the camera device to query. This must be a standalone camera ID which can be directly opened by `https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)`. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraExtensionCharacteristics` | The properties of the given camera. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException` | if the camera device has been disconnected. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the cameraId does not match any known camera device. |

**See also:**

- `https://developer.android.com/reference/android/hardware/camera2/CameraExtensionCharacteristics`
- `https://developer.android.com/reference/android/hardware/camera2/CameraDevice#createExtensionSession(android.hardware.camera2.params.ExtensionSessionConfiguration)`
- `https://developer.android.com/reference/android/hardware/camera2/CameraExtensionSession`

### getCameraIdList

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

```
public String[] getCameraIdList ()
```

Return the list of currently connected camera devices by identifier, including
cameras that may be in use by other camera API clients.

Non-removable cameras use integers starting at 0 for their
identifiers, while removable cameras have a unique identifier for each
individual device, even if they are the same model.

This list doesn't contain physical cameras that can only be used as part of a logical
multi-camera device.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The list of currently connected camera devices. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException` |   |

### getConcurrentCameraIds

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

```
public Set<Set<String>> getConcurrentCameraIds ()
```

Return the set of combinations of currently connected camera device identifiers, which
support configuring camera device sessions concurrently.

The devices in these combinations can be concurrently configured by the same
client camera application. Using these camera devices concurrently by two different
applications is not guaranteed to be supported, however.

For concurrent operation, in chronological order :

- Applications must first close any open cameras that have sessions configured, using `https://developer.android.com/reference/android/hardware/camera2/CameraDevice#close()`.
- All camera devices intended to be operated concurrently, must be opened using `https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)`, before configuring sessions on any of the camera devices.

<br />

Each device in a combination, is guaranteed to support stream combinations which may be
obtained by querying `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraCharacteristics(java.lang.String)` for the key
`https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS`.

For concurrent operation, if a camera device has a non null zoom ratio range as specified
by
`https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE`,
its complete zoom ratio range may not apply. Applications can use
`https://developer.android.com/reference/android/hardware/camera2/CaptureRequest#CONTROL_ZOOM_RATIO` \>=1 and \<=
`https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM`
during concurrent operation.


The set of combinations may include camera devices that may be in use by other camera API
clients.

Concurrent camera extension sessions `https://developer.android.com/reference/android/hardware/camera2/CameraExtensionSession` are not currently
supported.

The set of combinations doesn't contain physical cameras that can only be used as
part of a logical multi-camera device.

If a new camera id becomes available through
`https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onCameraUnavailable(java.lang.String)`, clients can call
this method to check if new combinations of camera ids which can stream concurrently are
available.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String>>` | The set of combinations of currently connected camera devices, that may have sessions configured concurrently. The set of combinations will be empty if no such combinations are supported by the camera subsystem. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException` | if the camera device has been disconnected. |

### getTorchStrengthLevel

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

```
public int getTorchStrengthLevel (String cameraId)
```

Returns the brightness level of the flash unit associated with the cameraId.

<br />

| Parameters ||
|---|---|
| `cameraId` | `String`: The unique identifier of the camera device that the flash unit belongs to. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `int` | The brightness level of the flash unit associated with cameraId. When the torch is turned OFF, the strength level will reset to a default level `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#FLASH_INFO_STRENGTH_DEFAULT_LEVEL`. In this case the return value will be `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#FLASH_INFO_STRENGTH_DEFAULT_LEVEL` rather than 0. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException` | if it failed to access the flash unit. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if cameraId was null, cameraId doesn't match any currently or previously available camera device, or the camera device doesn't have a flash unit. |

### isCameraDeviceSetupSupported

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

```
public boolean isCameraDeviceSetupSupported (String cameraId)
```

Checks a Camera Device's characteristics to ensure that a
`https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup` instance can be constructed for a given
`cameraId`. If this method returns false for a `cameraId`, calling
`https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraDeviceSetup(java.lang.String)` for that `cameraId` will throw an
`https://developer.android.com/reference/java/lang/UnsupportedOperationException`.

`https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup` is supported for all devices that report
`https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#INFO_SESSION_CONFIGURATION_QUERY_VERSION` \>
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#UPSIDE_DOWN_CAKE`

<br />

<br />

| Parameters ||
|---|---|
| `cameraId` | `String`: The unique identifier of the camera device for which `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup` support is being queried. This identifier must be present in `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()`. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup` object can be constructed for the provided `cameraId`; `false` otherwise. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException` | if the camera device is not accessible |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If `cameraId` is null, or if `cameraId` does not match any device in `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()`. |

**See also:**

- `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#INFO_SESSION_CONFIGURATION_QUERY_VERSION`
- `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup`
- `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraDeviceSetup(java.lang.String)`
- `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()`

### isConcurrentSessionConfigurationSupported

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

```
public boolean isConcurrentSessionConfigurationSupported (Map<String, SessionConfiguration> cameraIdAndSessionConfig)
```

Checks whether the provided set of camera devices and their corresponding
`https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration` can be configured concurrently.

This method performs a runtime check of the given `https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration` and camera
id combinations. The result confirms whether or not the passed session configurations can be
successfully used to create camera capture sessions concurrently, on the given camera
devices using `https://developer.android.com/reference/android/hardware/camera2/CameraDevice#createCaptureSession(android.hardware.camera2.params.SessionConfiguration)`.

The method can be called at any point before, during and after active capture sessions.
It will not impact normal camera behavior in any way and must complete significantly
faster than creating a regular or constrained capture session.

Although this method is faster than creating a new capture session, it is not intended
to be used for exploring the entire space of supported concurrent stream combinations. The
available mandatory concurrent stream combinations may be obtained by querying
`https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraCharacteristics(java.lang.String)` for the key
`https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS`.

Note that session parameters will be ignored and calls to
`https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration#setSessionParameters(android.hardware.camera2.CaptureRequest)` are not required.
.   
Requires `https://developer.android.com/reference/android/Manifest.permission#CAMERA`

<br />

<br />

| Parameters ||
|---|---|
| `cameraIdAndSessionConfig` | `Map`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the given combination of session configurations and corresponding camera ids are concurrently supported by the camera sub-system, `false` otherwise OR if the set of camera devices provided is not a subset of those returned by `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getConcurrentCameraIds()`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException` | if one of the camera devices queried is no longer connected. |

### openCamera

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

```
public void openCamera (String cameraId, 
                CameraDevice.StateCallback callback, 
                Handler handler)
```

Open a connection to a camera with the given ID.

Use `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()` to get the list of available camera
devices. Note that even if an id is listed, open may fail if the device
is disconnected between the calls to `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()` and
`https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)`, or if a higher-priority camera API client begins using the
camera device.

As of API level 23, devices for which the
`https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onCameraUnavailable(java.lang.String)` callback has been called due to the
device being in use by a lower-priority, background camera API client can still potentially
be opened by calling this method when the calling camera API client has a higher priority
than the current camera API client using this device. In general, if the top, foreground
activity is running within your application process, your process will be given the highest
priority when accessing the camera, and this method will succeed even if the camera device is
in use by another camera API client. Any lower-priority application that loses control of the
camera in this way will receive an
`https://developer.android.com/reference/android/hardware/camera2/CameraDevice.StateCallback#onDisconnected(android.hardware.camera2.CameraDevice)` callback.
Opening the same camera ID twice in the same application will similarly cause the
`https://developer.android.com/reference/android/hardware/camera2/CameraDevice.StateCallback#onDisconnected(android.hardware.camera2.CameraDevice)` callback
being fired for the `https://developer.android.com/reference/android/hardware/camera2/CameraDevice` from the first open call and all ongoing tasks
being dropped.

Once the camera is successfully opened, `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.StateCallback#onOpened(android.hardware.camera2.CameraDevice)` will
be invoked with the newly opened `https://developer.android.com/reference/android/hardware/camera2/CameraDevice`. The camera device can then be set up
for operation by calling `https://developer.android.com/reference/android/hardware/camera2/CameraDevice#createCaptureSession(android.hardware.camera2.params.SessionConfiguration)` and
`https://developer.android.com/reference/android/hardware/camera2/CameraDevice#createCaptureRequest(int)`

Before API level 30, when the application tries to open multiple `https://developer.android.com/reference/android/hardware/camera2/CameraDevice` of
different IDs and the device does not support opening such combination, either the
`https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)` will fail and throw a `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException` or one or more of
already opened `https://developer.android.com/reference/android/hardware/camera2/CameraDevice` will be disconnected and receive
`https://developer.android.com/reference/android/hardware/camera2/CameraDevice.StateCallback#onDisconnected(android.hardware.camera2.CameraDevice)` callback. Which
behavior will happen depends on the device implementation and can vary on different devices.
Starting in API level 30, if the device does not support the combination of cameras being
opened, it is guaranteed the `https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)` call will fail and none of existing
`https://developer.android.com/reference/android/hardware/camera2/CameraDevice` will be disconnected.

If the camera becomes disconnected during initialization
after this function call returns,
`https://developer.android.com/reference/android/hardware/camera2/CameraDevice.StateCallback#onDisconnected(android.hardware.camera2.CameraDevice)` with a
`https://developer.android.com/reference/android/hardware/camera2/CameraDevice` in the disconnected state (and
`https://developer.android.com/reference/android/hardware/camera2/CameraDevice.StateCallback#onOpened(android.hardware.camera2.CameraDevice)` will be skipped).

If opening the camera device fails, then the device callback's
`https://developer.android.com/reference/android/hardware/camera2/CameraDevice.StateCallback#onError(android.hardware.camera2.CameraDevice,%20int)` method will be called, and subsequent
calls on the camera device will throw a `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException`.
.   
Requires `https://developer.android.com/reference/android/Manifest.permission#CAMERA`

<br />

<br />

| Parameters ||
|---|---|
| `cameraId` | `String`: The unique identifier of the camera device to open. This value cannot be `null`. <br /> |
| `callback` | `CameraDevice.StateCallback`: The callback which is invoked once the camera is opened. This value cannot be `null`. <br /> |
| `handler` | `Handler`: The handler on which the callback should be invoked, or `null` to use the current thread's `https://developer.android.com/reference/android/os/Looper`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException` | if the camera is disabled by device policy, has been disconnected, is being used by a higher-priority camera API client, or the device has reached its maximal resource and cannot open this camera device. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if cameraId or the callback was null, or the cameraId does not match any currently or previously available camera device returned by `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()`. |
| `https://developer.android.com/reference/java/lang/SecurityException` | if the application does not have permission to access the camera |

**See also:**

- `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setCameraDisabled(android.content.ComponentName,%20boolean)`

### openCamera

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

```
public void openCamera (String cameraId, 
                Executor executor, 
                CameraDevice.StateCallback callback)
```

Open a connection to a camera with the given ID.

The behavior of this method matches that of
`https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)`, except that it uses
`https://developer.android.com/reference/java/util/concurrent/Executor` as an argument instead of
`https://developer.android.com/reference/android/os/Handler`.

Do note that typically callbacks are expected to be dispatched
by the executor in a single thread. If the executor uses two or
more threads to dispatch callbacks, then clients must ensure correct
synchronization and must also be able to handle potentially different
ordering of the incoming callbacks.
.   
Requires `https://developer.android.com/reference/android/Manifest.permission#CAMERA`

<br />

<br />

| Parameters ||
|---|---|
| `cameraId` | `String`: The unique identifier of the camera device to open. This value cannot be `null`. <br /> |
| `executor` | `Executor`: The executor which will be used when invoking the callback. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `callback` | `CameraDevice.StateCallback`: The callback which is invoked once the camera is opened. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException` | if the camera is disabled by device policy, has been disconnected, or is being used by a higher-priority camera API client. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if cameraId, the callback or the executor was null, or the cameraId does not match any currently or previously available camera device. |
| `https://developer.android.com/reference/java/lang/SecurityException` | if the application does not have permission to access the camera |

**See also:**

- `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()`
- `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setCameraDisabled(android.content.ComponentName,%20boolean)`

### registerAvailabilityCallback

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

```
public void registerAvailabilityCallback (Executor executor, 
                CameraManager.AvailabilityCallback callback)
```

Register a callback to be notified about camera device availability.

The behavior of this method matches that of
`https://developer.android.com/reference/android/hardware/camera2/CameraManager#registerAvailabilityCallback(android.hardware.camera2.CameraManager.AvailabilityCallback,%20android.os.Handler)`,
except that it uses `https://developer.android.com/reference/java/util/concurrent/Executor` as an argument
instead of `https://developer.android.com/reference/android/os/Handler`.

Note: If the order between some availability callbacks matters, the implementation of the
executor should handle those callbacks in the same thread to maintain the callbacks' order.
Some examples are:

- `https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onCameraAvailable(java.lang.String)` and `https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onCameraUnavailable(java.lang.String)` of the same camera ID.
- `https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onCameraAvailable(java.lang.String)` or `https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onCameraUnavailable(java.lang.String)` of a logical multi-camera, and `https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onPhysicalCameraUnavailable(java.lang.String,%20java.lang.String)` or `https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onPhysicalCameraAvailable(java.lang.String,%20java.lang.String)` of its physical cameras.

<br />

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: The executor which will be used to invoke the callback. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `callback` | `CameraManager.AvailabilityCallback`: the new callback to send camera availability notices to. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the executor is `null`. |

### registerAvailabilityCallback

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

```
public void registerAvailabilityCallback (CameraManager.AvailabilityCallback callback, 
                Handler handler)
```

Register a callback to be notified about camera device availability.

Registering the same callback again will replace the handler with the
new one provided.

The first time a callback is registered, it is immediately called
with the availability status of all currently known camera devices.

`https://developer.android.com/reference/android/hardware/camera2/CameraManager.AvailabilityCallback#onCameraUnavailable(java.lang.String)` will be called whenever a camera
device is opened by any camera API client. As of API level 23, other camera API clients may
still be able to open such a camera device, evicting the existing client if they have higher
priority than the existing client of a camera device. See open() for more details.

Since this callback will be registered with the camera service, remember to unregister it
once it is no longer needed; otherwise the callback will continue to receive events
indefinitely and it may prevent other resources from being released. Specifically, the
callbacks will be invoked independently of the general activity lifecycle and independently
of the state of individual CameraManager instances.

<br />

<br />

| Parameters ||
|---|---|
| `callback` | `CameraManager.AvailabilityCallback`: the new callback to send camera availability notices to. This value cannot be `null`. <br /> |
| `handler` | `Handler`: The handler on which the callback should be invoked, or `null` to use the current thread's `https://developer.android.com/reference/android/os/Looper`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the handler is `null` but the current thread has no looper. |

### registerTorchCallback

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

```
public void registerTorchCallback (Executor executor, 
                CameraManager.TorchCallback callback)
```

Register a callback to be notified about torch mode status.

The behavior of this method matches that of
`https://developer.android.com/reference/android/hardware/camera2/CameraManager#registerTorchCallback(android.hardware.camera2.CameraManager.TorchCallback,%20android.os.Handler)`,
except that it uses `https://developer.android.com/reference/java/util/concurrent/Executor` as an argument
instead of `https://developer.android.com/reference/android/os/Handler`.

<br />

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: The executor which will be used to invoke the callback. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `callback` | `CameraManager.TorchCallback`: The new callback to send torch mode status to. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the executor is `null`. |

### registerTorchCallback

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

```
public void registerTorchCallback (CameraManager.TorchCallback callback, 
                Handler handler)
```

Register a callback to be notified about torch mode status.

Registering the same callback again will replace the handler with the
new one provided.

The first time a callback is registered, it is immediately called
with the torch mode status of all currently known camera devices with a flash unit.

Since this callback will be registered with the camera service, remember to unregister it
once it is no longer needed; otherwise the callback will continue to receive events
indefinitely and it may prevent other resources from being released. Specifically, the
callbacks will be invoked independently of the general activity lifecycle and independently
of the state of individual CameraManager instances.

<br />

<br />

| Parameters ||
|---|---|
| `callback` | `CameraManager.TorchCallback`: The new callback to send torch mode status to. This value cannot be `null`. <br /> |
| `handler` | `Handler`: The handler on which the callback should be invoked, or `null` to use the current thread's `https://developer.android.com/reference/android/os/Looper`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the handler is `null` but the current thread has no looper. |

### setTorchMode

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

```
public void setTorchMode (String cameraId, 
                boolean enabled)
```

Set the flash unit's torch mode of the camera of the given ID without opening the camera
device.

Use `https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList()` to get the list of available camera devices and use
`https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraCharacteristics(java.lang.String)` to check whether the camera device has a flash unit.
Note that even if a camera device has a flash unit, turning on the torch mode may fail
if the camera device or other camera resources needed to turn on the torch mode are in use.

If `https://developer.android.com/reference/android/hardware/camera2/CameraManager#setTorchMode(java.lang.String,%20boolean)` is called to turn on or off the torch mode successfully,
`https://developer.android.com/reference/android/hardware/camera2/CameraManager.TorchCallback#onTorchModeChanged(java.lang.String,%20boolean)` will be invoked.
However, even if turning on the torch mode is successful, the application does not have the
exclusive ownership of the flash unit or the camera device. The torch mode will be turned
off and becomes unavailable when the camera device that the flash unit belongs to becomes
unavailable or when other camera resources to keep the torch on become unavailable (
`https://developer.android.com/reference/android/hardware/camera2/CameraManager.TorchCallback#onTorchModeUnavailable(java.lang.String)` will be invoked). Also,
other applications are free to call `https://developer.android.com/reference/android/hardware/camera2/CameraManager#setTorchMode(java.lang.String,%20boolean)` to turn off the torch mode (
`https://developer.android.com/reference/android/hardware/camera2/CameraManager.TorchCallback#onTorchModeChanged(java.lang.String,%20boolean)` will be invoked). If the latest
application that turned on the torch mode exits, the torch mode will be turned off.

<br />

| Parameters ||
|---|---|
| `cameraId` | `String`: The unique identifier of the camera device that the flash unit belongs to. This value cannot be `null`. <br /> |
| `enabled` | `boolean`: The desired state of the torch mode for the target camera device. Set to `true` to turn on the torch mode. Set to `false` to turn off the torch mode. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException` | if it failed to access the flash unit. `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException#CAMERA_IN_USE` will be thrown if the camera device is in use. `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException#MAX_CAMERAS_IN_USE` will be thrown if other camera resources needed to turn on the torch mode are in use. `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException#CAMERA_DISCONNECTED` will be thrown if camera service is not available. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if cameraId was null, cameraId doesn't match any currently or previously available camera device, or the camera device doesn't have a flash unit. |

### turnOnTorchWithStrengthLevel

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

```
public void turnOnTorchWithStrengthLevel (String cameraId, 
                int torchStrength)
```

Set the brightness level of the flashlight associated with the given cameraId in torch
mode. If the torch is OFF and torchStrength is \>= 1, torch will turn ON with the
strength level specified in torchStrength.

Use
`https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#FLASH_INFO_STRENGTH_MAXIMUM_LEVEL`
to check whether the camera device supports flash unit strength control or not. If this value
is greater than 1, applications can call this API to control the flashlight brightness level.

If `https://developer.android.com/reference/android/hardware/camera2/CameraManager#turnOnTorchWithStrengthLevel(java.lang.String,%20int)` is called to change the brightness level of the
flash unit `https://developer.android.com/reference/android/hardware/camera2/CameraManager.TorchCallback#onTorchStrengthLevelChanged(java.lang.String,%20int)` will be invoked.
If the new desired strength level is same as previously set level, then this callback will
not be invoked.
If the torch is OFF and `https://developer.android.com/reference/android/hardware/camera2/CameraManager#turnOnTorchWithStrengthLevel(java.lang.String,%20int)` is called with level \>= 1,
the torch will be turned ON with that brightness level. In this case
`https://developer.android.com/reference/android/hardware/camera2/CameraManager.TorchCallback#onTorchModeChanged(java.lang.String,%20boolean)` will also be invoked.

When the torch is turned OFF via `https://developer.android.com/reference/android/hardware/camera2/CameraManager#setTorchMode(java.lang.String,%20boolean)`, the flashlight brightness level
will reset to default value
`https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#FLASH_INFO_STRENGTH_DEFAULT_LEVEL`
In this case the `https://developer.android.com/reference/android/hardware/camera2/CameraManager.TorchCallback#onTorchStrengthLevelChanged(java.lang.String,%20int)` will not be
invoked.

If torch is enabled via `https://developer.android.com/reference/android/hardware/camera2/CameraManager#setTorchMode(java.lang.String,%20boolean)` after calling
`https://developer.android.com/reference/android/hardware/camera2/CameraManager#turnOnTorchWithStrengthLevel(java.lang.String,%20int)` with level N then the flash unit will have the
brightness level N.
Since multiple applications are free to call `https://developer.android.com/reference/android/hardware/camera2/CameraManager#setTorchMode(java.lang.String,%20boolean)`, when the latest
application that turned ON the torch mode exits, the torch mode will be turned OFF
and in this case the brightness level will reset to default level.

<br />

<br />

| Parameters ||
|---|---|
| `cameraId` | `String`: The unique identifier of the camera device that the flash unit belongs to. This value cannot be `null`. <br /> |
| `torchStrength` | `int`: The desired brightness level to be set for the flash unit in the range 1 to `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#FLASH_INFO_STRENGTH_MAXIMUM_LEVEL`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException` | if it failed to access the flash unit. `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException#CAMERA_IN_USE` will be thrown if the camera device is in use. `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException#MAX_CAMERAS_IN_USE` will be thrown if other camera resources needed to turn on the torch mode are in use. `https://developer.android.com/reference/android/hardware/camera2/CameraAccessException#CAMERA_DISCONNECTED` will be thrown if camera service is not available. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if cameraId was null, cameraId doesn't match any currently or previously available camera device, the camera device doesn't have a flash unit or if torchStrength is not within the range i.e. is greater than the maximum level `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#FLASH_INFO_STRENGTH_MAXIMUM_LEVEL` or \<= 0. |

### unregisterAvailabilityCallback

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

```
public void unregisterAvailabilityCallback (CameraManager.AvailabilityCallback callback)
```

Remove a previously-added callback; the callback will no longer receive connection and
disconnection callbacks.

Removing a callback that isn't registered has no effect.

<br />

<br />

| Parameters ||
|---|---|
| `callback` | `CameraManager.AvailabilityCallback`: The callback to remove from the notification list. This value cannot be `null`. <br /> |

### unregisterTorchCallback

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

```
public void unregisterTorchCallback (CameraManager.TorchCallback callback)
```

Remove a previously-added callback; the callback will no longer receive torch mode status
callbacks.

Removing a callback that isn't registered has no effect.

<br />

<br />

| Parameters ||
|---|---|
| `callback` | `CameraManager.TorchCallback`: The callback to remove from the notification list. This value cannot be `null`. <br /> |