DeviceInformationPairing.PairAsync DeviceInformationPairing.PairAsync DeviceInformationPairing.PairAsync DeviceInformationPairing.PairAsync DeviceInformationPairing.PairAsync Method

Definition

Overloads

PairAsync() PairAsync() PairAsync() PairAsync() PairAsync()

Attempts to pair the device.

PairAsync(DevicePairingProtectionLevel) PairAsync(DevicePairingProtectionLevel) PairAsync(DevicePairingProtectionLevel) PairAsync(DevicePairingProtectionLevel) PairAsync(DevicePairingProtectionLevel)

Attempts to pair the device using a provided level of protection.

PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings) PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings) PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings) PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings) PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings)

Attempts to pair a device object with a specified protection level and custom settings.

PairAsync() PairAsync() PairAsync() PairAsync() PairAsync()

Attempts to pair the device.

public : IAsyncOperation<DevicePairingResult> PairAsync()
IAsyncOperation<DevicePairingResult> PairAsync() const;
public IAsyncOperation<DevicePairingResult> PairAsync()
Public Function PairAsync() As IAsyncOperation(Of DevicePairingResult)
Windows.Devices.Enumeration.DeviceInformationPairing.pairAsync().done( /* Your success and error handlers */ );

Returns

See also

PairAsync(DevicePairingProtectionLevel) PairAsync(DevicePairingProtectionLevel) PairAsync(DevicePairingProtectionLevel) PairAsync(DevicePairingProtectionLevel) PairAsync(DevicePairingProtectionLevel)

Attempts to pair the device using a provided level of protection.

public : IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel minProtectionLevel)
IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel minProtectionLevel) const;
public IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel minProtectionLevel)
Public Function PairAsync(minProtectionLevel As DevicePairingProtectionLevel) As IAsyncOperation(Of DevicePairingResult)
Windows.Devices.Enumeration.DeviceInformationPairing.pairAsync(minProtectionLevel).done( /* Your success and error handlers */ );

Parameters

minProtectionLevel
DevicePairingProtectionLevel DevicePairingProtectionLevel DevicePairingProtectionLevel

The required level of protection to use for the pairing action.

Returns

Remarks

For all protocols other than Bluetooth, the minProtectionLevel value is ignored and the default behavior is always assumed. For the Bluetooth protocol, the pairing attempt will fail if the device doesn’t support the specified minimum protection level or a higher level. If the device doesn’t support the specified minimum protection level but does support a higher protection level, the higher protection level is used.

See also

PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings) PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings) PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings) PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings) PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings)

Attempts to pair a device object with a specified protection level and custom settings.

public : IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel minProtectionLevel, IDevicePairingSettings devicePairingSettings)
IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel minProtectionLevel, IDevicePairingSettings devicePairingSettings) const;
public IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel minProtectionLevel, IDevicePairingSettings devicePairingSettings)
Public Function PairAsync(minProtectionLevel As DevicePairingProtectionLevel, devicePairingSettings As IDevicePairingSettings) As IAsyncOperation(Of DevicePairingResult)
Windows.Devices.Enumeration.DeviceInformationPairing.pairAsync(minProtectionLevel, devicePairingSettings).done( /* Your success and error handlers */ );

Parameters

minProtectionLevel
DevicePairingProtectionLevel DevicePairingProtectionLevel DevicePairingProtectionLevel

The required level of protection to use for the pairing action.

devicePairingSettings
IDevicePairingSettings IDevicePairingSettings IDevicePairingSettings

The custom device pairing settings.

Returns

Additional features and requirements

Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Remarks

For all protocols other than Bluetooth, the minProtectionLevel value is ignored and the default behavior is always assumed. For the Bluetooth protocol, the pairing attempt will fail if the device doesn’t support the specified minimum protection level or a higher level. If the device doesn’t support the specified minimum protection level but does support a higher protection level, the higher protection level is used.

See also