BluetoothManager.GetConnectedDevices(ProfileType) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Get connected devices for the specified profile.
[Android.Runtime.Register("getConnectedDevices", "(I)Ljava/util/List;", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public System.Collections.Generic.IList<Android.Bluetooth.BluetoothDevice>? GetConnectedDevices (Android.Bluetooth.ProfileType profile);
[<Android.Runtime.Register("getConnectedDevices", "(I)Ljava/util/List;", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.GetConnectedDevices : Android.Bluetooth.ProfileType -> System.Collections.Generic.IList<Android.Bluetooth.BluetoothDevice>
Parameters
- profile
- ProfileType
GATT or GATT_SERVER
Returns
List of devices. The list will be empty on error.
- Attributes
Remarks
Get connected devices for the specified profile.
Return the set of devices which are in state BluetoothProfile#STATE_CONNECTED
This is not specific to any application configuration but represents the connection state of Bluetooth for this profile. This can be used by applications like status bar which would just like to know the state of Bluetooth.
Java documentation for android.bluetooth.BluetoothManager.getConnectedDevices(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.