Gatt​Characteristic​Notification​Trigger Gatt​Characteristic​Notification​Trigger Gatt​Characteristic​Notification​Trigger Class

Definition

Represents a trigger that launches a background task when an incoming change notification is received for a Bluetooth LE GATT characteristic.

public sealed class GattCharacteristicNotificationTrigger : IBackgroundTrigger, IGattCharacteristicNotificationTrigger, IGattCharacteristicNotificationTrigger2public sealed class GattCharacteristicNotificationTrigger : IBackgroundTrigger, IGattCharacteristicNotificationTrigger, IGattCharacteristicNotificationTrigger2Public NotInheritable Class GattCharacteristicNotificationTrigger Implements IBackgroundTrigger, IGattCharacteristicNotificationTrigger, IGattCharacteristicNotificationTrigger2
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

GattCharacteristicNotificationTrigger(GattCharacteristic) GattCharacteristicNotificationTrigger(GattCharacteristic) GattCharacteristicNotificationTrigger(GattCharacteristic)

Initializes a new instance of the GattCharacteristicNotificationTrigger class.

public GattCharacteristicNotificationTrigger(GattCharacteristic characteristic)public GattCharacteristicNotificationTrigger(GattCharacteristic characteristic)Public Sub New(characteristic As GattCharacteristic)
Parameters
characteristic
GattCharacteristic GattCharacteristic GattCharacteristic

The GATT characteristic for which value change notifications are desired.

Attributes

Remarks

To register for notifications when the value of a GATT characteristic changes, an app does the following:

  1. Create an instance of the GattCharacteristicNotificationTrigger object.

  2. Create an instance of the BackgroundTaskBuilder object, and call SetTrigger to attach the GattCharacteristicNotificationTrigger.

  3. Call Register on the BackgroundTaskBuilder object.

Note that this can only be done for Bluetooth LE devices, and only for characteristics for which the device is willing to generate notifications or indications. The system will attempt to keep the specified Bluetooth LE device in a connected state as long as at least one of the notification triggers is outstanding.

GattCharacteristicNotificationTrigger(GattCharacteristic, BluetoothEventTriggeringMode) GattCharacteristicNotificationTrigger(GattCharacteristic, BluetoothEventTriggeringMode) GattCharacteristicNotificationTrigger(GattCharacteristic, BluetoothEventTriggeringMode)

Initializes a new instance of the GattCharacteristicNotificationTrigger class with the specified characteristic and triggering mode.

public GattCharacteristicNotificationTrigger(GattCharacteristic characteristic, BluetoothEventTriggeringMode eventTriggeringMode)public GattCharacteristicNotificationTrigger(GattCharacteristic characteristic, BluetoothEventTriggeringMode eventTriggeringMode)Public Sub New(characteristic As GattCharacteristic, eventTriggeringMode As BluetoothEventTriggeringMode)
Parameters
characteristic
GattCharacteristic GattCharacteristic GattCharacteristic

The GATT characteristic that you want value change notifications for.

eventTriggeringMode
BluetoothEventTriggeringMode BluetoothEventTriggeringMode BluetoothEventTriggeringMode

Specifies when the trigger is activated.

Attributes
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Properties

Characteristic Characteristic Characteristic

Gets the GATT characteristic for which value change notifications are desired.

public GattCharacteristic Characteristic { get; }public GattCharacteristic Characteristic { get; }Public ReadOnly Property Characteristic As GattCharacteristic
Value
GattCharacteristic GattCharacteristic GattCharacteristic

The GATT characteristic for which value change notifications are desired.

Attributes

EventTriggeringMode EventTriggeringMode EventTriggeringMode

Gets the mode for the trigger. The mode specifies when the trigger is activated.

public BluetoothEventTriggeringMode EventTriggeringMode { get; }public BluetoothEventTriggeringMode EventTriggeringMode { get; }Public ReadOnly Property EventTriggeringMode As BluetoothEventTriggeringMode
Attributes
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
See Also