Most visited

Recently visited

Added in API level 23

AudioDeviceCallback

public abstract class AudioDeviceCallback
extends Object

java.lang.Object
   ↳ android.media.AudioDeviceCallback


AudioDeviceCallback定义了应用程序可以接收音频设备连接和断开事件通知的机制。

也可以看看:

Summary

Public constructors

AudioDeviceCallback()

Public methods

void onAudioDevicesAdded(AudioDeviceInfo[] addedDevices)

AudioManager调用以指示已连接一个或多个音频设备。

void onAudioDevicesRemoved(AudioDeviceInfo[] removedDevices)

AudioManager调用以指示一个或多个音频设备已断开连接。

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)

AudioManager调用以指示已连接一个或多个音频设备。

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)

AudioManager调用以指示一个或多个音频设备已断开连接。

Parameters
removedDevices AudioDeviceInfo: An array of AudioDeviceInfo objects corresponding to any newly removed audio devices.

Hooray!