Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/media/AudioDeviceInfo#constants) \| [Methods](https://developer.android.com/reference/android/media/AudioDeviceInfo#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/media/AudioDeviceInfo#inhmethods)

# AudioDeviceInfo

*** ** * ** ***

` public final class AudioDeviceInfo `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.media.AudioDeviceInfo |

<br />

*** ** * ** ***

Provides information about an audio device.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_AUX_LINE` A device type describing the auxiliary line-level connectors. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLE_BROADCAST` A device type describing a Bluetooth Low Energy (BLE) broadcast group. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLE_CENTRAL` A device corresponding to the receive or transmit path in an Android implementation operating in a Bluetooth audio peripheral mode (LE Audio, A2DP or HFP profiles). |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLE_CENTRAL_BROADCAST` A device corresponding to the receive path in an Android implementation operating in a Bluetooth LE audio peripheral mode part of a broadcast group. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLE_HEADSET` A device type describing a Bluetooth Low Energy (BLE) audio headset or headphones. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLE_HEARING_AID` A device type describing a Bluetooth Low Energy (BLE) hearing aid. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLE_SPEAKER` A device type describing a Bluetooth Low Energy (BLE) audio speaker. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLUETOOTH_A2DP` A device type describing a Bluetooth device supporting the A2DP profile. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLUETOOTH_SCO` A device type describing a Bluetooth device typically used for telephony. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BUILTIN_EARPIECE` A device type describing the attached earphone speaker. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BUILTIN_MIC` A device type describing the microphone(s) built in a device. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BUILTIN_SPEAKER` A device type describing the speaker system (i.e. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BUILTIN_SPEAKER_SAFE` A device type describing the speaker system (i.e. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BUS` A type-agnostic device used for communication with external audio systems |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_DOCK` A device type describing the audio device associated with a dock. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_DOCK_ANALOG` A device type describing the audio device associated with a dock using an analog connection. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_FM` A device type associated with the transmission of audio signals over FM. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_FM_TUNER` A device type for accessing the audio content transmitted over FM. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_HDMI` A device type describing an HDMI connection . |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_HDMI_ARC` A device type describing the Audio Return Channel of an HDMI connection. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_HDMI_EARC` A device type describing the Enhanced Audio Return Channel of an HDMI connection. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_HEARING_AID` A device type describing a Hearing Aid. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_IP` A device type connected over IP. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_LINE_ANALOG` A device type describing an analog line-level connection. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_LINE_DIGITAL` A device type describing a digital line connection (e.g. SPDIF). |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_MULTICHANNEL_GROUP` A device type describing a speaker group that supports multichannel contents. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_REMOTE_SUBMIX` A device type for rerouting audio within the Android framework between mixes and system applications. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_TELEPHONY` A device type describing the transmission of audio signals over the telephony network. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_TV_TUNER` A device type for accessing the audio content transmitted over the TV tuner system. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_UNKNOWN` A device type associated with an unknown or uninitialized device. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_USB_ACCESSORY` A device type describing a USB audio device in accessory mode. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_USB_DEVICE` A device type describing a USB audio device. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_USB_HEADSET` A device type describing a USB audio headset. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_WIRED_HEADPHONES` A device type describing a pair of wired headphones. |
| `int` | `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_WIRED_HEADSET` A device type describing a headset, which is the combination of a headphones and microphone. |

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object o) ` Indicates whether some other object is "equal to" this one. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getAddress()() ` |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/media/AudioDescriptor>` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getAudioDescriptors()() ` |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/media/AudioProfile>` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getAudioProfiles()() ` |
| ` int[]` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getChannelCounts()() ` |
| ` int[]` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getChannelIndexMasks()() ` |
| ` int[]` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getChannelMasks()() ` |
| ` int[]` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getEncapsulationMetadataTypes()() ` Returns an array of supported encapsulation metadata types for the device. |
| ` int[]` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getEncapsulationModes()() ` Returns an array of supported encapsulation modes for the device. |
| ` int[]` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getEncodings()() ` |
| ` int` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getId()() ` |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getProductName()() ` |
| ` int[]` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getSampleRates()() ` |
| ` int` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getSpeakerLayoutChannelMask()() ` |
| ` int` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#getType()() ` |
| ` int` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#hashCode()() ` Returns a hash code value for the object. |
| ` boolean` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#isSink()() ` |
| ` boolean` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#isSource()() ` |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/media/AudioDeviceInfo#toString()() ` Returns a string representation of the object. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### TYPE_AUX_LINE

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

```
public static final int TYPE_AUX_LINE
```

A device type describing the auxiliary line-level connectors.

<br />

Constant Value: 19 (0x00000013)

### TYPE_BLE_BROADCAST

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

```
public static final int TYPE_BLE_BROADCAST
```

A device type describing a Bluetooth Low Energy (BLE) broadcast group.

<br />

Constant Value: 30 (0x0000001e)

### TYPE_BLE_CENTRAL

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

```
public static final int TYPE_BLE_CENTRAL
```

A device corresponding to the receive or transmit path in an Android implementation operating in a Bluetooth audio peripheral mode (LE Audio, A2DP or HFP profiles).

<br />

Constant Value: 34 (0x00000022)

### TYPE_BLE_CENTRAL_BROADCAST

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

```
public static final int TYPE_BLE_CENTRAL_BROADCAST
```

A device corresponding to the receive path in an Android implementation operating in a Bluetooth LE audio peripheral mode part of a broadcast group.

<br />

Constant Value: 35 (0x00000023)

### TYPE_BLE_HEADSET

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

```
public static final int TYPE_BLE_HEADSET
```

A device type describing a Bluetooth Low Energy (BLE) audio headset or headphones. Headphones are grouped with headsets when the device is a sink: the features of headsets and headphones with regard to playback are the same.

<br />

Constant Value: 26 (0x0000001a)

### TYPE_BLE_HEARING_AID

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

```
public static final int TYPE_BLE_HEARING_AID
```

A device type describing a Bluetooth Low Energy (BLE) hearing aid.

<br />

Constant Value: 33 (0x00000021)

### TYPE_BLE_SPEAKER

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

```
public static final int TYPE_BLE_SPEAKER
```

A device type describing a Bluetooth Low Energy (BLE) audio speaker.

<br />

Constant Value: 27 (0x0000001b)

### TYPE_BLUETOOTH_A2DP

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

```
public static final int TYPE_BLUETOOTH_A2DP
```

A device type describing a Bluetooth device supporting the A2DP profile.

<br />

Constant Value: 8 (0x00000008)

### TYPE_BLUETOOTH_SCO

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

```
public static final int TYPE_BLUETOOTH_SCO
```

A device type describing a Bluetooth device typically used for telephony.

<br />

Constant Value: 7 (0x00000007)

### TYPE_BUILTIN_EARPIECE

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

```
public static final int TYPE_BUILTIN_EARPIECE
```

A device type describing the attached earphone speaker.

<br />

Constant Value: 1 (0x00000001)

### TYPE_BUILTIN_MIC

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

```
public static final int TYPE_BUILTIN_MIC
```

A device type describing the microphone(s) built in a device.

<br />

Constant Value: 15 (0x0000000f)

### TYPE_BUILTIN_SPEAKER

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

```
public static final int TYPE_BUILTIN_SPEAKER
```

A device type describing the speaker system (i.e. a mono speaker or stereo speakers) built in a device.

<br />

Constant Value: 2 (0x00000002)

### TYPE_BUILTIN_SPEAKER_SAFE

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

```
public static final int TYPE_BUILTIN_SPEAKER_SAFE
```

A device type describing the speaker system (i.e. a mono speaker or stereo speakers) built in a device, that is specifically tuned for outputting sounds like notifications and alarms (i.e. sounds the user couldn't necessarily anticipate).

Note that this physical audio device may be the same as `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BUILTIN_SPEAKER` but is driven differently to safely accommodate the different use case.

<br />

<br />

Constant Value: 24 (0x00000018)

### TYPE_BUS

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

```
public static final int TYPE_BUS
```

A type-agnostic device used for communication with external audio systems

<br />

Constant Value: 21 (0x00000015)

### TYPE_DOCK

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

```
public static final int TYPE_DOCK
```

A device type describing the audio device associated with a dock. Starting at API 34, this device type only represents digital docks, while docks with an analog connection are represented with `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_DOCK_ANALOG`.

<br />

**See also:**

- `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_DOCK_ANALOG`

Constant Value: 13 (0x0000000d)

### TYPE_DOCK_ANALOG

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

```
public static final int TYPE_DOCK_ANALOG
```

A device type describing the audio device associated with a dock using an analog connection.

<br />

Constant Value: 31 (0x0000001f)

### TYPE_FM

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

```
public static final int TYPE_FM
```

A device type associated with the transmission of audio signals over FM.

<br />

Constant Value: 14 (0x0000000e)

### TYPE_FM_TUNER

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

```
public static final int TYPE_FM_TUNER
```

A device type for accessing the audio content transmitted over FM.

<br />

Constant Value: 16 (0x00000010)

### TYPE_HDMI

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

```
public static final int TYPE_HDMI
```

A device type describing an HDMI connection .

<br />

Constant Value: 9 (0x00000009)

### TYPE_HDMI_ARC

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

```
public static final int TYPE_HDMI_ARC
```

A device type describing the Audio Return Channel of an HDMI connection.

<br />

Constant Value: 10 (0x0000000a)

### TYPE_HDMI_EARC

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

```
public static final int TYPE_HDMI_EARC
```

A device type describing the Enhanced Audio Return Channel of an HDMI connection.

<br />

Constant Value: 29 (0x0000001d)

### TYPE_HEARING_AID

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

```
public static final int TYPE_HEARING_AID
```

A device type describing a Hearing Aid.

<br />

Constant Value: 23 (0x00000017)

### TYPE_IP

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

```
public static final int TYPE_IP
```

A device type connected over IP.

<br />

Constant Value: 20 (0x00000014)

### TYPE_LINE_ANALOG

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

```
public static final int TYPE_LINE_ANALOG
```

A device type describing an analog line-level connection.

<br />

Constant Value: 5 (0x00000005)

### TYPE_LINE_DIGITAL

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

```
public static final int TYPE_LINE_DIGITAL
```

A device type describing a digital line connection (e.g. SPDIF).

<br />

Constant Value: 6 (0x00000006)

### TYPE_MULTICHANNEL_GROUP

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

```
public static final int TYPE_MULTICHANNEL_GROUP
```

A device type describing a speaker group that supports multichannel contents. The speakers in the group are connected together using local network based protocols. The speaker group requires additional input of the physical positions of each individual speaker to provide a better experience on multichannel contents.

<br />

Constant Value: 32 (0x00000020)

### TYPE_REMOTE_SUBMIX

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

```
public static final int TYPE_REMOTE_SUBMIX
```

A device type for rerouting audio within the Android framework between mixes and system applications. This type is for instance encountered when querying the output device of a track (with `https://developer.android.com/reference/android/media/AudioTrack#getRoutedDevice()` playing from a device in screen mirroring mode, where the audio is not heard on the device, but on the remote device.

<br />

Constant Value: 25 (0x00000019)

### TYPE_TELEPHONY

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

```
public static final int TYPE_TELEPHONY
```

A device type describing the transmission of audio signals over the telephony network.

<br />

Constant Value: 18 (0x00000012)

### TYPE_TV_TUNER

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

```
public static final int TYPE_TV_TUNER
```

A device type for accessing the audio content transmitted over the TV tuner system.

<br />

Constant Value: 17 (0x00000011)

### TYPE_UNKNOWN

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

```
public static final int TYPE_UNKNOWN
```

A device type associated with an unknown or uninitialized device.

<br />

Constant Value: 0 (0x00000000)

### TYPE_USB_ACCESSORY

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

```
public static final int TYPE_USB_ACCESSORY
```

A device type describing a USB audio device in accessory mode.

<br />

Constant Value: 12 (0x0000000c)

### TYPE_USB_DEVICE

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

```
public static final int TYPE_USB_DEVICE
```

A device type describing a USB audio device.

<br />

Constant Value: 11 (0x0000000b)

### TYPE_USB_HEADSET

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

```
public static final int TYPE_USB_HEADSET
```

A device type describing a USB audio headset.

<br />

Constant Value: 22 (0x00000016)

### TYPE_WIRED_HEADPHONES

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

```
public static final int TYPE_WIRED_HEADPHONES
```

A device type describing a pair of wired headphones.

<br />

Constant Value: 4 (0x00000004)

### TYPE_WIRED_HEADSET

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

```
public static final int TYPE_WIRED_HEADSET
```

A device type describing a headset, which is the combination of a headphones and microphone.

<br />

Constant Value: 3 (0x00000003)

## Public methods

### equals

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

```
public boolean equals (Object o)
```

Indicates whether some other object is "equal to" this one.

The `equals` method implements an equivalence relation on non-null object references:

- It is *reflexive*: for any non-null reference value `x`, `x.equals(x)` should return `true`.
- It is *symmetric*: for any non-null reference values `x` and `y`, `x.equals(y)` should return `true` if and only if `y.equals(x)` returns `true`.
- It is *transitive*: for any non-null reference values `x`, `y`, and `z`, if `x.equals(y)` returns `true` and `y.equals(z)` returns `true`, then `x.equals(z)` should return `true`.
- It is *consistent*: for any non-null reference values `x` and `y`, multiple invocations of `x.equals(y)` consistently return `true` or consistently return `false`, provided no information used in `equals` comparisons on the objects is modified.
- For any non-null reference value `x`, `x.equals(null)` should return `false`.

An equivalence relation partitions the elements it operates on into *equivalence classes*; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

<br />

| Parameters ||
|---|---|
| `o` | `Object`: the reference object with which to compare. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### getAddress

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

```
public String getAddress ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The "address" string of the device. This generally contains device-specific parameters. This value cannot be `null`. <br /> |

### getAudioDescriptors

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

```
public List<AudioDescriptor> getAudioDescriptors ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/media/AudioDescriptor>` | A list of `https://developer.android.com/reference/android/media/AudioDescriptor` supported by the audio devices. This value cannot be `null`. <br /> |

### getAudioProfiles

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

```
public List<AudioProfile> getAudioProfiles ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/media/AudioProfile>` | A list of `https://developer.android.com/reference/android/media/AudioProfile` supported by the audio devices. This value cannot be `null`. <br /> |

### getChannelCounts

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

```
public int[] getChannelCounts ()
```

<br />

<br />

| Returns ||
|---|---|
| `int[]` | An array of channel counts (1, 2, 4, ...) for which this audio device can be configured. Note: an empty array indicates that the device supports arbitrary channel counts. This value cannot be `null`. <br /> |

### getChannelIndexMasks

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

```
public int[] getChannelIndexMasks ()
```

<br />

<br />

| Returns ||
|---|---|
| `int[]` | An array of channel index masks for which this audio device can be configured. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/media/AudioFormat`

### getChannelMasks

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

```
public int[] getChannelMasks ()
```

<br />

<br />

| Returns ||
|---|---|
| `int[]` | An array of channel position masks (e.g. `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_STEREO`, `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_7POINT1`) for which this audio device can be configured. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/media/AudioFormat`

### getEncapsulationMetadataTypes

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

```
public int[] getEncapsulationMetadataTypes ()
```

Returns an array of supported encapsulation metadata types for the device. The metadata type returned should be allowed for all encapsulation modes supported by the device. Some metadata types may apply only to certain compressed stream formats, the returned list is the union of subsets. The array can include any of `https://developer.android.com/reference/android/media/AudioTrack#ENCAPSULATION_METADATA_TYPE_FRAMEWORK_TUNER`, `https://developer.android.com/reference/android/media/AudioTrack#ENCAPSULATION_METADATA_TYPE_DVB_AD_DESCRIPTOR`.

<br />

| Returns ||
|---|---|
| `int[]` | An array of supported encapsulation metadata types for the device. This may be an empty array if no metadata types are supported. This value cannot be `null`. Value is one of the following: - `https://developer.android.com/reference/android/media/AudioTrack#ENCAPSULATION_METADATA_TYPE_FRAMEWORK_TUNER` - `https://developer.android.com/reference/android/media/AudioTrack#ENCAPSULATION_METADATA_TYPE_DVB_AD_DESCRIPTOR` - `https://developer.android.com/reference/android/media/AudioTrack#ENCAPSULATION_METADATA_TYPE_SUPPLEMENTARY_AUDIO_PLACEMENT` |

### getEncapsulationModes

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

```
public int[] getEncapsulationModes ()
```

Returns an array of supported encapsulation modes for the device. The array can include any of the `AudioTrack` encapsulation modes, e.g. `https://developer.android.com/reference/android/media/AudioTrack#ENCAPSULATION_MODE_ELEMENTARY_STREAM`.

<br />

| Returns ||
|---|---|
| `int[]` | An array of supported encapsulation modes for the device. This may be an empty array if no encapsulation modes are supported. This value cannot be `null`. Value is one of the following: - `https://developer.android.com/reference/android/media/AudioTrack#ENCAPSULATION_MODE_NONE` - `https://developer.android.com/reference/android/media/AudioTrack#ENCAPSULATION_MODE_ELEMENTARY_STREAM` |

### getEncodings

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

```
public int[] getEncodings ()
```

<br />

<br />

| Returns ||
|---|---|
| `int[]` | An array of audio encodings (e.g. `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_16BIT`, `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_FLOAT`) supported by the audio device. `ENCODING_PCM_FLOAT` indicates the device supports more than 16 bits of integer precision. As there is no AudioFormat constant specifically defined for 24-bit PCM, the value `ENCODING_PCM_FLOAT` indicates that `https://developer.android.com/reference/android/media/AudioTrack` or `https://developer.android.com/reference/android/media/AudioRecord` can preserve at least 24 bits of integer precision to that device. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/media/AudioFormat`

### getId

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

```
public int getId ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | The internal device ID. <br /> |

### getProductName

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

```
public CharSequence getProductName ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | The human-readable name of the audio device. <br /> |

### getSampleRates

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

```
public int[] getSampleRates ()
```

<br />

<br />

| Returns ||
|---|---|
| `int[]` | An array of sample rates supported by the audio device. Note: an empty array indicates that the device supports arbitrary rates. This value cannot be `null`. <br /> |

### getSpeakerLayoutChannelMask

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

```
public int getSpeakerLayoutChannelMask ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | A ChannelMask representing the speaker layout of a TYPE_BUILTIN_SPEAKER device. Valid only for speakers built-in to the device. The layout channel mask only indicates which speaker channels are present, the physical layout of the speakers should be informed by a standard for multi-channel sound playback systems, such as ITU-R BS.2051. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_INVALID` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_DEFAULT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_LEFT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_RIGHT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_CENTER` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_LOW_FREQUENCY` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BACK_LEFT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BACK_RIGHT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_LEFT_OF_CENTER` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_RIGHT_OF_CENTER` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BACK_CENTER` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_SIDE_LEFT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_SIDE_RIGHT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_CENTER` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_FRONT_LEFT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_FRONT_CENTER` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_FRONT_RIGHT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_BACK_LEFT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_BACK_CENTER` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_BACK_RIGHT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_SIDE_LEFT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_SIDE_RIGHT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BOTTOM_FRONT_LEFT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BOTTOM_FRONT_CENTER` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BOTTOM_FRONT_RIGHT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_LOW_FREQUENCY_2` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_WIDE_LEFT` - `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_WIDE_RIGHT` |

**See also:**

- `https://developer.android.com/reference/android/media/AudioFormat`

### getType

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

```
public int getType ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | The device type identifier of the audio device (i.e. TYPE_BUILTIN_SPEAKER). Value is one of the following: - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BUILTIN_EARPIECE` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BUILTIN_SPEAKER` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_WIRED_HEADSET` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_WIRED_HEADPHONES` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLUETOOTH_SCO` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLUETOOTH_A2DP` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_HDMI` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_DOCK` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_USB_ACCESSORY` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_USB_DEVICE` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_USB_HEADSET` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_TELEPHONY` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_LINE_ANALOG` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_HDMI_ARC` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_HDMI_EARC` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_LINE_DIGITAL` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_FM` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_AUX_LINE` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_IP` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BUS` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_HEARING_AID` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BUILTIN_MIC` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_FM_TUNER` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_TV_TUNER` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BUILTIN_SPEAKER_SAFE` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_REMOTE_SUBMIX` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLE_HEADSET` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLE_SPEAKER` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLE_BROADCAST` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_DOCK_ANALOG` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_MULTICHANNEL_GROUP` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLE_HEARING_AID` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLE_CENTRAL` - `https://developer.android.com/reference/android/media/AudioDeviceInfo#TYPE_BLE_CENTRAL_BROADCAST` |

### hashCode

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

```
public int hashCode ()
```

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by `https://developer.android.com/reference/java/util/HashMap`.

The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is *not* required that if two objects are unequal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### isSink

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

```
public boolean isSink ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the audio device is a sink for audio data (i.e. an output). <br /> |

### isSource

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

```
public boolean isSource ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the audio device is a source for audio data (e.e an input). <br /> |

### toString

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

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |