Partager via


BluetoothLeAudio.GetConnectedGroupLeadDevice(Int32) Method

Definition

Get Lead device for the group.

[Android.Runtime.Register("getConnectedGroupLeadDevice", "(I)Landroid/bluetooth/BluetoothDevice;", "", ApiSince=33)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public Android.Bluetooth.BluetoothDevice? GetConnectedGroupLeadDevice (int groupId);
[<Android.Runtime.Register("getConnectedGroupLeadDevice", "(I)Landroid/bluetooth/BluetoothDevice;", "", ApiSince=33)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.GetConnectedGroupLeadDevice : int -> Android.Bluetooth.BluetoothDevice

Parameters

groupId
Int32

The group id.

Returns

group lead device.

Attributes

Remarks

Get Lead device for the group.

Lead device is the device that can be used as an active device in the system. Active devices points to the Audio Device for the Le Audio group. This method returns the Lead devices for the connected LE Audio group and this device should be used in the setActiveDevice() method by other parts of the system, which wants to set to active a particular Le Audio group.

Note: getActiveDevice() returns the Lead device for the currently active LE Audio group. Note: When Lead device gets disconnected while Le Audio group is active and has more devices in the group, then Lead device will not change. If Lead device gets disconnected, for the Le Audio group which is not active, a new Lead device will be chosen

Java documentation for android.bluetooth.BluetoothLeAudio.getConnectedGroupLeadDevice(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