# CameraDeviceSetupCompat.SupportQueryResult

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

*** ** * ** ***


```
class CameraDeviceSetupCompat.SupportQueryResult
```

<br />

*** ** * ** ***

Result of a `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat#isSessionConfigurationSupported(android.hardware.camera2.params.SessionConfiguration)` query.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#RESULT_SUPPORTED() = 1` The `https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration.html` is supported by the camera. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#RESULT_UNDEFINED() = 0` The library cannot determine if the `https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration.html` is supported. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#RESULT_UNSUPPORTED() = 2` The `https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration.html` is not supported by the camera. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#SOURCE_ANDROID_FRAMEWORK() = 2` Source of the result is Android framework. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#SOURCE_PLAY_SERVICES() = 1` Source of the result is Google Play Services. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#SOURCE_UNDEFINED() = 0` Source of the result is undefined. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#SupportQueryResult(int,int,long)(supported: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, source: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, timestampMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Creates a new instance of `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#getSource()()` Returns the source of the result. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#getSupported()()` Whether the `https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration.html` is supported. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#getTimestampMillis()()` Returns the epoch timestamp of when the result was updated. |

## Constants

### RESULT_SUPPORTED

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

```
const val RESULT_SUPPORTED = 1: Int
```

The `https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration.html` is supported by the camera.

### RESULT_UNDEFINED

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

```
const val RESULT_UNDEFINED = 0: Int
```

The library cannot determine if the `https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration.html` is supported.

For API levels 29 to 34 inclusive, the app may continue to call `https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#isSessionConfigurationSupported(android.hardware.camera2.params.SessionConfiguration)` to check if the session configuration is supported.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompatFactory#getCameraDeviceSetupCompat(java.lang.String)` | for sample code. |

### RESULT_UNSUPPORTED

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

```
const val RESULT_UNSUPPORTED = 2: Int
```

The `https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration.html` is not supported by the camera.

### SOURCE_ANDROID_FRAMEWORK

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

```
const val SOURCE_ANDROID_FRAMEWORK = 2: Int
```

Source of the result is Android framework.

### SOURCE_PLAY_SERVICES

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

```
const val SOURCE_PLAY_SERVICES = 1: Int
```

Source of the result is Google Play Services.

### SOURCE_UNDEFINED

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

```
const val SOURCE_UNDEFINED = 0: Int
```

Source of the result is undefined. This is always accompanied by `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#RESULT_UNDEFINED()`.

## Public constructors

### SupportQueryResult

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

```
SupportQueryResult(supported: Int, source: Int, timestampMillis: Long)
```

Creates a new instance of `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult`.

| Parameters |
|---|---|
| `supported: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Whether the `https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration.html` is supported. |
| `source: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The source of the result. |
| `timestampMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The epoch timestamp of when the result was updated. |

## Public functions

### getSource

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

```
fun getSource(): Int
```

Returns the source of the result.

If the source of the information is Play Services, the value is `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#SOURCE_PLAY_SERVICES()`; if the source is Android framework, the value is `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#SOURCE_ANDROID_FRAMEWORK()`; otherwise, the value is `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#SOURCE_UNDEFINED()`.

### getSupported

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

```
fun getSupported(): Int
```

Whether the `https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration.html` is supported.

If the value is `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#RESULT_SUPPORTED()`, the configuration is supported by the camera; if the value is `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#RESULT_UNSUPPORTED()`, the configuration is not supported by the camera; if the value is `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#RESULT_UNDEFINED()`, then the library cannot determine if the configuration is supported or not.

### getTimestampMillis

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

```
fun getTimestampMillis(): Long
```

Returns the epoch timestamp of when the result was updated.

If the source is `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#SOURCE_PLAY_SERVICES()`, the value is the time when the data is updated on the Play Services server; if the source is `https://developer.android.com/reference/kotlin/androidx/camera/featurecombinationquery/CameraDeviceSetupCompat.SupportQueryResult#SOURCE_ANDROID_FRAMEWORK()`, the value is the build property "ro.build.date.utc" if available; otherwise, it will return 0.