Share via


BluetoothAdapter.FromIdAsync(String) Method

Definition

Gets a BluetoothAdapter object identified by the given DeviceId.

public:
 static IAsyncOperation<BluetoothAdapter ^> ^ FromIdAsync(Platform::String ^ deviceId);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<BluetoothAdapter> FromIdAsync(winrt::hstring const& deviceId);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<BluetoothAdapter> FromIdAsync(string deviceId);
function fromIdAsync(deviceId)
Public Shared Function FromIdAsync (deviceId As String) As IAsyncOperation(Of BluetoothAdapter)

Parameters

deviceId
String

Platform::String

winrt::hstring

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

After the asynchronous operation completes, returns the BluetoothAdapter object identified by the given DeviceId.

Attributes

Windows requirements

App capabilities
bluetooth

Applies to