Jaa


BluetoothLEAdvertisementWatcher Class

Definition

An object to receive Bluetooth Low Energy (LE) advertisements.

public ref class BluetoothLEAdvertisementWatcher sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Devices.Bluetooth.Advertisement.IBluetoothLEAdvertisementWatcherFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class BluetoothLEAdvertisementWatcher final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Devices.Bluetooth.Advertisement.IBluetoothLEAdvertisementWatcherFactory, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class BluetoothLEAdvertisementWatcher final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Devices.Bluetooth.Advertisement.IBluetoothLEAdvertisementWatcherFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class BluetoothLEAdvertisementWatcher
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Devices.Bluetooth.Advertisement.IBluetoothLEAdvertisementWatcherFactory), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class BluetoothLEAdvertisementWatcher
function BluetoothLEAdvertisementWatcher(advertisementFilter)
Public NotInheritable Class BluetoothLEAdvertisementWatcher
Inheritance
Object Platform::Object IInspectable BluetoothLEAdvertisementWatcher
Attributes

Windows requirements

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

Remarks

Version history

Windows version SDK version Value added
2004 19041 AllowExtendedAdvertisements

Constructors

BluetoothLEAdvertisementWatcher()

Creates a new BluetoothLEAdvertisementWatcher object.

BluetoothLEAdvertisementWatcher(BluetoothLEAdvertisementFilter)

Creates a new BluetoothLEAdvertisementWatcher object with an advertisement filter to initialize the watcher.

Properties

AdvertisementFilter

Gets or sets a BluetoothLEAdvertisementFilter object used for configuration of Bluetooth LE advertisement filtering that uses payload section-based filtering.

AllowExtendedAdvertisements

Enables reception of advertisements using the Extended Advertising format. Defaults to False.

MaxOutOfRangeTimeout

Gets the maximum out of range timeout.

MaxSamplingInterval

Gets the maximum sampling interval.

MinOutOfRangeTimeout

Gets the minimum out of range timeout.

MinSamplingInterval

Gets the minimum sampling interval.

ScanningMode

Gets or sets the Bluetooth LE scanning mode.

ScanParameters
SignalStrengthFilter

Gets or sets a BluetoothSignalStrengthFilter object used for configuration of Bluetooth LE advertisement filtering that uses signal strength-based filtering.

Status

Gets the current status of the BluetoothLEAdvertisementWatcher.

UseCodedPhy
UseHardwareFilter
UseUncoded1MPhy

Methods

Start()

Start the BluetoothLEAdvertisementWatcher to scan for Bluetooth LE advertisements.

Stop()

Stop the BluetoothLEAdvertisementWatcher and disable the scanning for Bluetooth LE advertisements.

Events

Received

Notification for new Bluetooth LE advertisement events received.

Stopped

Notification to the app that the Bluetooth LE scanning for advertisements has been cancelled or aborted either by the app or due to an error.

Applies to

See also