Skip to content

Most visited

Recently visited

navigation

AudioDeviceCallback

public abstract class AudioDeviceCallback
extends Object

java.lang.Object
   ↳ android.media.AudioDeviceCallback


AudioDeviceCallback defines the mechanism by which applications can receive notifications of audio device connection and disconnection events.

See also:

Summary

Public constructors

AudioDeviceCallback()

Public methods

void onAudioDevicesAdded(AudioDeviceInfo[] addedDevices)

Called by the AudioManager to indicate that one or more audio devices have been connected.

void onAudioDevicesRemoved(AudioDeviceInfo[] removedDevices)

Called by the AudioManager to indicate that one or more audio devices have been disconnected.

Inherited methods

From class java.lang.Object

Public constructors

AudioDeviceCallback

added in API level 23
AudioDeviceCallback ()

Public methods

onAudioDevicesAdded

added in API level 23
void onAudioDevicesAdded (AudioDeviceInfo[] addedDevices)

Called by the AudioManager to indicate that one or more audio devices have been connected.

Parameters
addedDevices AudioDeviceInfo: An array of AudioDeviceInfo objects corresponding to any newly added audio devices.

onAudioDevicesRemoved

added in API level 23
void onAudioDevicesRemoved (AudioDeviceInfo[] removedDevices)

Called by the AudioManager to indicate that one or more audio devices have been disconnected.

Parameters
removedDevices AudioDeviceInfo: An array of AudioDeviceInfo objects corresponding to any newly removed audio devices.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.