Table of Contents

Class CameraMetadata

Represents a map of camera device, capture request or capture result metadata.

public abstract class CameraMetadata
Inheritance
object
CameraMetadata
Derived
Extension Methods

Constructors

CameraMetadata(AndroidJavaObject, string)

public CameraMetadata(AndroidJavaObject native, string className)

Parameters

native AndroidJavaObject
className string

Fields

KeyProviderClass

The Java/Kotlin class which provides the keys and constants for this instance.

public readonly AndroidJavaClass KeyProviderClass

Field Value

AndroidJavaClass

Native

The native object.

public readonly AndroidJavaObject Native

Field Value

AndroidJavaObject

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetConstant(string)

Gets a constant value from android.hardware.camera2.CameraMetadata.

public int GetConstant(string name)

Parameters

name string

The name of the constant field.

Returns

int

GetKeys()

Returns the keys contained in this map.

public CameraMetadata.Key[] GetKeys()

Returns

Key[]

Remarks

The caller is responsible for the disposal of all returned CameraMetadata.Key objects.

GetKeysFromListNative(string)

protected CameraMetadata.Key[] GetKeysFromListNative(string methodName)

Parameters

methodName string

Returns

Key[]

ThrowIfDisposed()

protected void ThrowIfDisposed()

TryGet<T>(string, out T)

Tries to get a value from this map.

public bool TryGet<T>(string keyName, out T value)

Parameters

keyName string

The name of the key.

value T

The result.

Returns

bool

true if the key exists and was converted successfully into a managed type, false otherwise.

Type Parameters

T

The type of the value.

Remarks

Supports converting to the types supported by ToManaged<T>(AndroidJavaObject) + AndroidJavaObject.

Exceptions

KeyNotFoundException

Thrown if the key is not defined in KeyProviderClass.

TryGet<T>(Key, out T)

Tries to get a value from this map.

public bool TryGet<T>(CameraMetadata.Key key, out T value)

Parameters

key CameraMetadata.Key

The key.

value T

The result.

Returns

bool

true if the key exists and was converted successfully into a managed type, false otherwise.

Type Parameters

T

The type of the value.

Remarks

Supports converting to the types supported by ToManaged<T>(AndroidJavaObject) + AndroidJavaObject.