BluetoothLEDevice.GetDeviceSelectorFromPairingState(Boolean) Method

Definition

Creates an Advanced Query Syntax (AQS) filter string that contains a query for Bluetooth LE devices that are either paired or unpaired. The AQS string is passed into the CreateWatcher method to return a collection of DeviceInformation objects.

public:
 static Platform::String ^ GetDeviceSelectorFromPairingState(bool pairingState);
 static winrt::hstring GetDeviceSelectorFromPairingState(bool const& pairingState);
public static string GetDeviceSelectorFromPairingState(bool pairingState);
function getDeviceSelectorFromPairingState(pairingState)
Public Shared Function GetDeviceSelectorFromPairingState (pairingState As Boolean) As String

Parameters

pairingState
Boolean

bool

The current pairing state for Bluetooth LE devices used for constructing the AQS string. Bluetooth LE devices can be either paired (true) or unpaired (false). The AQS Filter string will request scanning to be performed when the pairingState is false.

Returns

String

Platform::String

winrt::hstring

An AQS string that can be passed as a parameter to the CreateWatcher method.

Windows requirements

Device family
Windows 10 (introduced in 10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v2.0)
App capabilities
bluetooth

Applies to