Added in API level 30

AudioMetadataMap


interface AudioMetadataMap : AudioMetadataReadMap
android.media.AudioMetadataMap

AudioMetadataMap is a writeable Map-style interface of AudioMetadata.Key value pairs. This interface is not guaranteed to be thread-safe unless the underlying implementation for the AudioMetadataMap states it as thread safe. {@see AudioMetadataReadMap}

Summary

Public methods
abstract T?

Removes the value associated with the key.

abstract T?
set(key: AudioMetadata.Key<T>, value: T)

Sets a value for the key.

Inherited functions

Public methods

remove

Added in API level 30
abstract fun <T : Any!> remove(key: AudioMetadata.Key<T>): T?

Removes the value associated with the key.

Parameters
key AudioMetadata.Key<T>: interface for storing the value. This value cannot be null.
<T> type of value.
Return
T? the value of the key, null if it doesn't exist.

set

Added in API level 30
abstract fun <T : Any!> set(
    key: AudioMetadata.Key<T>,
    value: T
): T?

Sets a value for the key.

Parameters
key AudioMetadata.Key<T>: interface for storing the value. This value cannot be null.
<T> type of value.
value T: a non-null value of type T.
Return
T? the previous value associated with key or null if it doesn't exist.