BluetoothLEAdvertisementWatcher クラス

定義

Bluetooth Low Energy (LE) アドバタイズを受信するオブジェクト。

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
継承
Object Platform::Object IInspectable BluetoothLEAdvertisementWatcher
属性

Windows の要件

デバイス ファミリ
Windows 10 (10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox で導入)
API contract
Windows.Foundation.UniversalApiContract (v1.0 で導入)
アプリの機能
bluetooth

注釈

バージョン履歴

Windows のバージョン SDK バージョン 追加された値
2004 19041 AllowExtendedAdvertisements

コンストラクター

BluetoothLEAdvertisementWatcher()

新しい BluetoothLEAdvertisementWatcher オブジェクトを 作成します。

BluetoothLEAdvertisementWatcher(BluetoothLEAdvertisementFilter)

ウォッチャーを初期化するためのアドバタイズ フィルターを使用して、新しい BluetoothLEAdvertisementWatcher オブジェクトを作成します。

プロパティ

AdvertisementFilter

ペイロード セクションベースのフィルター処理を使用する Bluetooth LE アドバタイズフィルターの構成に使用される BluetoothLEAdvertisementFilter オブジェクトを取得または設定します。

AllowExtendedAdvertisements

拡張広告形式を使用して広告を受信できるようにします。 既定値は False です。

MaxOutOfRangeTimeout

範囲外のタイムアウトの最大値を取得します。

MaxSamplingInterval

最大サンプリング間隔を取得します。

MinOutOfRangeTimeout

範囲外のタイムアウトの最小値を取得します。

MinSamplingInterval

最小サンプリング間隔を取得します。

ScanningMode

Bluetooth LE スキャン モードを取得または設定します。

SignalStrengthFilter

信号強度ベースのフィルター処理を使用する Bluetooth LE アドバタイズフィルターの構成に使用される BluetoothSignalStrengthFilter オブジェクトを取得または設定します。

Status

BluetoothLEAdvertisementWatcher の現在の状態を取得します。

メソッド

Start()

BluetoothLEAdvertisementWatcher を起動して、Bluetooth LE アドバタイズをスキャンします。

Stop()

BluetoothLEAdvertisementWatcher を停止し、Bluetooth LE アドバタイズのスキャンを無効にします。

イベント

Received

受信した新しい Bluetooth LE アドバタイズ イベントの通知。

Stopped

アプリによって、またはエラーが原因で、通知の Bluetooth LE スキャンが取り消されたか中止されたことをアプリに通知します。

適用対象

こちらもご覧ください