Android 12 Developer Preview is here! Try it out, and give us your feedback!

CaptureRequestOptions

open class CaptureRequestOptions : ReadableConfig
kotlin.Any
   ↳ androidx.camera.camera2.interop.CaptureRequestOptions

A bundle of Camera2 capture request options.

Summary

Nested classes

Builder for creating CaptureRequestOptions instance.

Public constructors
<init>(@NonNull config: Config)

Creates a CaptureRequestOptions for reading Camera2 capture request options from the given config.

Public methods
open ValueT?
getCaptureRequestOption(@NonNull key: Key<ValueT>)

Returns a value for the given CaptureRequest.Key or null if it hasn't been set.

Public constructors

<init>

CaptureRequestOptions(@NonNull config: Config)

Creates a CaptureRequestOptions for reading Camera2 capture request options from the given config.

Parameters
config Config: The config that potentially contains Camera2 capture request options.

Public methods

getCaptureRequestOption

@Nullable open fun <ValueT : Any!> getCaptureRequestOption(@NonNull key: Key<ValueT>): ValueT?

Returns a value for the given CaptureRequest.Key or null if it hasn't been set.

Parameters
key Key<ValueT>: The key to retrieve.
<ValueT> The type of the value.
Return
ValueT? The stored value or null if the value does not exist in this configuration.