BluetoothAdapter BluetoothAdapter BluetoothAdapter BluetoothAdapter Class

Definition

Represents a Bluetooth adapter.

public : sealed class BluetoothAdapter : IBluetoothAdapter
public sealed class BluetoothAdapter : IBluetoothAdapter
Public NotInheritable Class BluetoothAdapter Implements IBluetoothAdapter
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

Properties

BluetoothAddress BluetoothAddress BluetoothAddress BluetoothAddress

Gets the device address.

public : ulong BluetoothAddress { get; }
public ulong BluetoothAddress { get; }
Public ReadOnly Property BluetoothAddress As ulong
var ulong = bluetoothAdapter.bluetoothAddress;
Value
ulong ulong ulong ulong

The device address.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

DeviceId DeviceId DeviceId DeviceId

Gets the device ID.

public : Platform::String DeviceId { get; }
public string DeviceId { get; }
Public ReadOnly Property DeviceId As string
var string = bluetoothAdapter.deviceId;
Value
Platform::String string string string

The ID of the device.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

IsAdvertisementOffloadSupported IsAdvertisementOffloadSupported IsAdvertisementOffloadSupported IsAdvertisementOffloadSupported

Gets a boolean indicating if the adapter supports advertisement offload.

public : Platform::Boolean IsAdvertisementOffloadSupported { get; }
public bool IsAdvertisementOffloadSupported { get; }
Public ReadOnly Property IsAdvertisementOffloadSupported As bool
var bool = bluetoothAdapter.isAdvertisementOffloadSupported;
Value
Platform::Boolean bool bool bool

Gets a boolean indicating if the adapter supports advertisement offload.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

IsCentralRoleSupported IsCentralRoleSupported IsCentralRoleSupported IsCentralRoleSupported

Gets a boolean indicating if the adapater supports LowEnergy central role.

public : Platform::Boolean IsCentralRoleSupported { get; }
public bool IsCentralRoleSupported { get; }
Public ReadOnly Property IsCentralRoleSupported As bool
var bool = bluetoothAdapter.isCentralRoleSupported;
Value
Platform::Boolean bool bool bool

Gets a boolean indicating if the adapater supports LowEnergy central role.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

IsClassicSupported IsClassicSupported IsClassicSupported IsClassicSupported

Gets a boolean indicating if the adapter supports the Bluetooth Classic transport type.

public : Platform::Boolean IsClassicSupported { get; }
public bool IsClassicSupported { get; }
Public ReadOnly Property IsClassicSupported As bool
var bool = bluetoothAdapter.isClassicSupported;
Value
Platform::Boolean bool bool bool

Gets a boolean indicating if the adapter supports the Bluetooth Classic transport type.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

IsLowEnergySupported IsLowEnergySupported IsLowEnergySupported IsLowEnergySupported

Gets a boolean indicating if the adapater supports LowEnergy Bluetooth Transport type.

public : Platform::Boolean IsLowEnergySupported { get; }
public bool IsLowEnergySupported { get; }
Public ReadOnly Property IsLowEnergySupported As bool
var bool = bluetoothAdapter.isLowEnergySupported;
Value
Platform::Boolean bool bool bool

Gets a boolean indicating if the adapater supports LowEnergy Bluetooth Transport type.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

IsPeripheralRoleSupported IsPeripheralRoleSupported IsPeripheralRoleSupported IsPeripheralRoleSupported

Gets a boolean indicating if the adapater supports LowEnergy peripheral role.

public : Platform::Boolean IsPeripheralRoleSupported { get; }
public bool IsPeripheralRoleSupported { get; }
Public ReadOnly Property IsPeripheralRoleSupported As bool
var bool = bluetoothAdapter.isPeripheralRoleSupported;
Value
Platform::Boolean bool bool bool

Gets a boolean indicating if the adapater supports LowEnergy peripheral role.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

Methods

FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String)

Gets a BluetoothAdapter object identified by the given DeviceId.

public : static IAsyncOperation<BluetoothAdapter> FromIdAsync(Platform::String deviceId)
public static IAsyncOperation<BluetoothAdapter> FromIdAsync(String deviceId)
Public Static Function FromIdAsync(deviceId As String) As IAsyncOperation( Of BluetoothAdapter )
Windows.Devices.Bluetooth.BluetoothAdapter.fromIdAsync(deviceId).done( /* Your success and error handlers */ );
Parameters
deviceId
Platform::String String String String

The DeviceId value that identifies the BluetoothAdapter instance. This is a composite string combining registry information that includes the MatchingDeviceId, the MAC address, and a GUID representing a device class. This is different than Windows.Devices.Enumeration.DeviceInformation.Id. However, both contain the MAC address of the Bluetooth radio device embedded within the identifier string.

Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

GetDefaultAsync() GetDefaultAsync() GetDefaultAsync() GetDefaultAsync()

Gets the default BluetoothAdapter.

public : static IAsyncOperation<BluetoothAdapter> GetDefaultAsync()
public static IAsyncOperation<BluetoothAdapter> GetDefaultAsync()
Public Static Function GetDefaultAsync() As IAsyncOperation( Of BluetoothAdapter )
Windows.Devices.Bluetooth.BluetoothAdapter.getDefaultAsync().done( /* Your success and error handlers */ );
Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector()

Gets an Advanced Query Syntax (AQS) string for identifying instances of this adapter. This string is passed to the FindAllAsync or CreateWatcher method.

public : static Platform::String GetDeviceSelector()
public static string GetDeviceSelector()
Public Static Function GetDeviceSelector() As string
var string = Windows.Devices.Bluetooth.BluetoothAdapter.getDeviceSelector();
Returns
Platform::String string string string

Returns an AQS string.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

GetRadioAsync() GetRadioAsync() GetRadioAsync() GetRadioAsync()

Gets the radio represented by this Bluetooth adapter.

public : IAsyncOperation<Radio> GetRadioAsync()
public IAsyncOperation<Radio> GetRadioAsync()
Public Function GetRadioAsync() As IAsyncOperation( Of Radio )
Windows.Devices.Bluetooth.BluetoothAdapter.getRadioAsync().done( /* Your success and error handlers */ );
Returns

Returns an asynchronous operation that completes with the Radio.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth