CameraDeviceSetupCompat.SupportQueryResult


class CameraDeviceSetupCompat.SupportQueryResult


Result of a isSessionConfigurationSupported query.

Summary

Constants

const Int

The SessionConfiguration is supported by the camera.

const Int

The library cannot determine if the SessionConfiguration is supported.

const Int

The SessionConfiguration is not supported by the camera.

const Int

Source of the result is Android framework.

const Int

Source of the result is Google Play Services.

const Int

Source of the result is undefined.

Public constructors

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

Creates a new instance of SupportQueryResult.

Public functions

Int

Returns the source of the result.

Int

Whether the SessionConfiguration is supported.

Long

Returns the epoch timestamp of when the result was updated.

Constants

RESULT_SUPPORTED

Added in 1.4.0
const val RESULT_SUPPORTED = 1: Int

The SessionConfiguration is supported by the camera.

RESULT_UNDEFINED

Added in 1.4.0
const val RESULT_UNDEFINED = 0: Int

The library cannot determine if the SessionConfiguration is supported.

For API levels 29 to 34 inclusive, the app may continue to call isSessionConfigurationSupported to check if the session configuration is supported.

See also
getCameraDeviceSetupCompat

for sample code.

RESULT_UNSUPPORTED

Added in 1.4.0
const val RESULT_UNSUPPORTED = 2: Int

The SessionConfiguration is not supported by the camera.

SOURCE_ANDROID_FRAMEWORK

Added in 1.4.0
const val SOURCE_ANDROID_FRAMEWORK = 2: Int

Source of the result is Android framework.

SOURCE_PLAY_SERVICES

Added in 1.4.0
const val SOURCE_PLAY_SERVICES = 1: Int

Source of the result is Google Play Services.

SOURCE_UNDEFINED

Added in 1.4.0
const val SOURCE_UNDEFINED = 0: Int

Source of the result is undefined. This is always accompanied by RESULT_UNDEFINED.

Public constructors

SupportQueryResult

Added in 1.4.0
SupportQueryResult(supported: Int, source: Int, timestampMillis: Long)

Creates a new instance of SupportQueryResult.

Parameters
supported: Int

Whether the SessionConfiguration is supported.

source: Int

The source of the result.

timestampMillis: Long

The epoch timestamp of when the result was updated.

Public functions

getSource

Added in 1.4.0
fun getSource(): Int

Returns the source of the result.

If the source of the information is Play Services, the value is SOURCE_PLAY_SERVICES; if the source is Android framework, the value is SOURCE_ANDROID_FRAMEWORK; otherwise, the value is SOURCE_UNDEFINED.

getSupported

Added in 1.4.0
fun getSupported(): Int

Whether the SessionConfiguration is supported.

If the value is RESULT_SUPPORTED, the configuration is supported by the camera; if the value is RESULT_UNSUPPORTED, the configuration is not supported by the camera; if the value is RESULT_UNDEFINED, then the library cannot determine if the configuration is supported or not.

getTimestampMillis

Added in 1.4.0
fun getTimestampMillis(): Long

Returns the epoch timestamp of when the result was updated.

If the source is SOURCE_PLAY_SERVICES, the value is the time when the data is updated on the Play Services server; if the source is SOURCE_ANDROID_FRAMEWORK, the value is the build property "ro.build.date.utc" if available; otherwise, it will return 0.