# CameraExtensionsInfo

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

*** ** * ** ***


```
interface CameraExtensionsInfo
```

<br />

*** ** * ** ***

A camera extensions info instance that allows to observe or monitor capture request settings and results for supported camera extensions.

Applications can leverage the `https://developer.android.com/reference/kotlin/androidx/camera/extensions/ExtensionsManager#getCameraExtensionsInfo(androidx.camera.core.CameraInfo)` method to acquire a CameraExtensionsInfo object for observing extension-specific settings and results.

## Summary

| ### Public functions |
|---|---|
| `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/extensions/CameraExtensionsInfo#getCurrentExtensionMode()()` Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` which observes the extension mode changes for the extensions-enabled camera that is associated with the CameraExtensionsInfo. |
| `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/extensions/CameraExtensionsInfo#getExtensionStrength()()` Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` which observes the extension strength changes for the extensions-enabled camera that is associated with the CameraExtensionsInfo. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/extensions/CameraExtensionsInfo#isCurrentExtensionModeAvailable()()` Returns whether reporting the currently active extension mode is supported for the extensions-enabled camera that is associated with the CameraExtensionsInfo. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/extensions/CameraExtensionsInfo#isExtensionStrengthAvailable()()` Returns whether extension strength is supported for the extensions-enabled camera that is associated with the CameraExtensionsInfo. |

## Public functions

### getCurrentExtensionMode

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

```
fun getCurrentExtensionMode(): LiveData<Int!>?
```

Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` which observes the extension mode changes for the extensions-enabled camera that is associated with the CameraExtensionsInfo.

This is only available when `https://developer.android.com/reference/kotlin/androidx/camera/extensions/CameraExtensionsInfo#isCurrentExtensionModeAvailable()` returns `
true`. When this is supported, the initial value will be equal to the extension mode the session was started with. Then, the current extension mode may change over time. For example, when the extension mode is `https://developer.android.com/reference/kotlin/androidx/camera/extensions/ExtensionMode#AUTO()`, the current extension mode may change to the `https://developer.android.com/reference/kotlin/androidx/camera/extensions/ExtensionMode#NIGHT()` or `https://developer.android.com/reference/kotlin/androidx/camera/extensions/ExtensionMode#HDR()` depending on the current lighting conditions or environment.

| 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 extension mode changes when `https://developer.android.com/reference/kotlin/androidx/camera/extensions/CameraExtensionsInfo#isCurrentExtensionModeAvailable()` returns `true`. Otherwise, returns `null`. |

### getExtensionStrength

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

```
fun getExtensionStrength(): LiveData<Int!>?
```

Returns a `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` which observes the extension strength changes for the extensions-enabled camera that is associated with the CameraExtensionsInfo.

This is only available when `https://developer.android.com/reference/kotlin/androidx/camera/extensions/CameraExtensionsInfo#isExtensionStrengthAvailable()` returns `true
`. When this is supported, the extension strength value will range from 0 to 100 and will dynamically change based on the latest adjustments made within the current extension mode.

| 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 extension strength changes when `https://developer.android.com/reference/kotlin/androidx/camera/extensions/CameraExtensionsInfo#isExtensionStrengthAvailable()` returns `true`. Otherwise, returns `null`. |

### isCurrentExtensionModeAvailable

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

```
fun isCurrentExtensionModeAvailable(): Boolean
```

Returns whether reporting the currently active extension mode is supported for the extensions-enabled camera that is associated with the CameraExtensionsInfo.

When current extension mode is supported, applications can observe the current extension value changes via the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` object returned by `https://developer.android.com/reference/kotlin/androidx/camera/extensions/CameraExtensionsInfo#getCurrentExtensionMode()`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if current extension mode is supported. Otherwise, returns ` false`. |

### isExtensionStrengthAvailable

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

```
fun isExtensionStrengthAvailable(): Boolean
```

Returns whether extension strength is supported for the extensions-enabled camera that is associated with the CameraExtensionsInfo.

When extension strength is supported, applications can change the strength setting via `https://developer.android.com/reference/kotlin/androidx/camera/extensions/CameraExtensionsControl#setExtensionStrength(int)` and observe the strength value changes via the `https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData` object returned by `https://developer.android.com/reference/kotlin/androidx/camera/extensions/CameraExtensionsInfo#getExtensionStrength()`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if extension strength is supported. Otherwise, returns `false`. |