BluetoothLEAdvertisementWatcher Klasse
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ein Objekt zum Empfangen von Bluetooth Low Energy (LE)-Ankündigungen.
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
- Vererbung
- Attribute
Windows-Anforderungen
| Gerätefamilie |
Windows 10 (eingeführt in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
| API contract |
Windows.Foundation.UniversalApiContract (eingeführt in v1.0)
|
| App-Funktionen |
bluetooth
|
Hinweise
Versionsverlauf
| Windows-Version | SDK-Version | Wertschöpfung |
|---|---|---|
| 2004 | 19041 | AllowExtendedAdvertisements |
Konstruktoren
| BluetoothLEAdvertisementWatcher() |
Erstellt ein neues BluetoothLEAdvertisementWatcher-Objekt . |
| BluetoothLEAdvertisementWatcher(BluetoothLEAdvertisementFilter) |
Erstellt ein neues BluetoothLEAdvertisementWatcher-Objekt mit einem Ankündigungsfilter, um den Watcher zu initialisieren. |
Eigenschaften
| AdvertisementFilter |
Ruft ein BluetoothLEAdvertisementFilter-Objekt ab, das für die Konfiguration der Bluetooth LE-Ankündigungsfilterung verwendet wird und die auf Nutzlastabschnitten basierende Filterung verwendet, oder legt es fest. |
| AllowExtendedAdvertisements |
Ermöglicht den Empfang von Werbung im Format "Erweiterte Werbung". Der Standardwert lautet „False“. |
| MaxOutOfRangeTimeout |
Ruft das maximale Out-of-Range-Timeout ab. |
| MaxSamplingInterval |
Ruft das maximale Samplingintervall ab. |
| MinOutOfRangeTimeout |
Ruft das minimale Out-of-Range-Timeout ab. |
| MinSamplingInterval |
Ruft das minimale Samplingintervall ab. |
| ScanningMode |
Ruft den Bluetooth LE-Überprüfungsmodus ab oder legt diese fest. |
| ScanParameters |
Ein Objekt zum Empfangen von Bluetooth Low Energy (LE)-Ankündigungen. |
| SignalStrengthFilter |
Ruft ein BluetoothSignalStrengthFilter-Objekt ab, das für die Konfiguration der Bluetooth LE-Ankündigungsfilterung verwendet wird und die signalstärkebasierte Filterung verwendet, oder legt es fest. |
| Status |
Ruft die aktuelle status von BluetoothLEAdvertisementWatcher ab. |
| UseCodedPhy |
Ein Objekt zum Empfangen von Bluetooth Low Energy (LE)-Ankündigungen. |
| UseHardwareFilter |
Ein Objekt zum Empfangen von Bluetooth Low Energy (LE)-Ankündigungen. |
| UseUncoded1MPhy |
Ein Objekt zum Empfangen von Bluetooth Low Energy (LE)-Ankündigungen. |
Methoden
| Start() |
Starten Sie bluetoothLEAdvertisementWatcher , um nach Bluetooth LE-Werbung zu suchen. |
| Stop() |
Beenden Sie bluetoothLEAdvertisementWatcher , und deaktivieren Sie die Überprüfung nach Bluetooth LE-Werbung. |
Ereignisse
| Received |
Benachrichtigung für neue Bluetooth LE-Werbeereignisse empfangen. |
| Stopped |
Benachrichtigung an die App, dass die Bluetooth LE-Überprüfung auf Werbung entweder von der App oder aufgrund eines Fehlers abgebrochen oder abgebrochen wurde. |