Share via


AudioManager.GetDevices(GetDevicesTargets) Method

Definition

Returns an array of AudioDeviceInfo objects corresponding to the audio devices currently connected to the system and meeting the criteria specified in the flags parameter.

[Android.Runtime.Register("getDevices", "(I)[Landroid/media/AudioDeviceInfo;", "GetGetDevices_IHandler", ApiSince=23)]
public virtual Android.Media.AudioDeviceInfo[]? GetDevices (Android.Media.GetDevicesTargets flags);
[<Android.Runtime.Register("getDevices", "(I)[Landroid/media/AudioDeviceInfo;", "GetGetDevices_IHandler", ApiSince=23)>]
abstract member GetDevices : Android.Media.GetDevicesTargets -> Android.Media.AudioDeviceInfo[]
override this.GetDevices : Android.Media.GetDevicesTargets -> Android.Media.AudioDeviceInfo[]

Parameters

flags
GetDevicesTargets

A set of bitflags specifying the criteria to test.

Returns

A (possibly zero-length) array of AudioDeviceInfo objects.

Attributes

Remarks

Returns an array of AudioDeviceInfo objects corresponding to the audio devices currently connected to the system and meeting the criteria specified in the flags parameter. Notes that Android audio framework only support one device per device type. In that case, if there are multiple audio device with the same device type connected to the Android device, only the last reported device will be known by Android audio framework and returned by this API.

Java documentation for android.media.AudioManager.getDevices(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to