# AudioMetadata.Key

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

# AudioMetadata.Key

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/media/AudioMetadata.Key "View this page in Kotlin")\|Java

`
public
static


interface
AudioMetadata.Key
`  
`


`

|--------------------------------------|
| android.media.AudioMetadata.Key\<T\> |

<br />

*** ** * ** ***

Key interface for the`AudioMetadata`map.

The presence of this`Key`interface on an object allows it to reference metadata in the Audio Framework.

Vendors are allowed to implement this`Key`interface for their debugging or private application use. To avoid name conflicts, vendor key names should be qualified by the vendor company name followed by a dot; for example, "vendorCompany.someVolume".

<br />

## Summary

|                                                                                                                  ### Public methods                                                                                                                   ||
|-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract `[String](https://developer.android.com/reference/java/lang/String)    | ` `[getName](https://developer.android.com/reference/android/media/AudioMetadata.Key#getName())`() ` Returns the internal name of the key.                         |
| ` abstract `[Class](https://developer.android.com/reference/java/lang/Class)`<T>` | ` `[getValueClass](https://developer.android.com/reference/android/media/AudioMetadata.Key#getValueClass())`() ` Returns the class type`T`of the associated value. |

## Public methods

### getName

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract String getName ()
```

Returns the internal name of the key. The name should be unique in the`AudioMetadata`namespace. Vendors should prefix their keys with the company name followed by a dot.

<br />

|                                                Returns                                                 ||
|--------------------------------------------------------------------|------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | This value cannot be`null`. <br /> |

### getValueClass

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract Class<T> getValueClass ()
```

Returns the class type`T`of the associated value. Valid class types for[Build.VERSION_CODES.R](https://developer.android.com/reference/android/os/Build.VERSION_CODES#R)are`Integer.class`,`Long.class`,`Float.class`,`Double.class`,`String.class`.

<br />

|                                                  Returns                                                  ||
|-----------------------------------------------------------------------|------------------------------------|
| [Class](https://developer.android.com/reference/java/lang/Class)`<T>` | This value cannot be`null`. <br /> |