GattCharacteristicNotificationTrigger
GattCharacteristicNotificationTrigger
GattCharacteristicNotificationTrigger
GattCharacteristicNotificationTrigger
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// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Constructors
GattCharacteristicNotificationTrigger(GattCharacteristic) 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)// You can use this method in JavaScript.
- characteristic
- GattCharacteristic GattCharacteristic GattCharacteristic GattCharacteristic
The GATT characteristic for which value change notifications are desired.
Remarks
To register for notifications when the value of a GATT characteristic changes, an app does the following:
Create an instance of the GattCharacteristicNotificationTrigger object.
Create an instance of the BackgroundTaskBuilder object, and call SetTrigger to attach the GattCharacteristicNotificationTrigger.
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) 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)// You can use this method in JavaScript.
- characteristic
- GattCharacteristic GattCharacteristic GattCharacteristic GattCharacteristic
The GATT characteristic that you want value change notifications for.
- eventTriggeringMode
- BluetoothEventTriggeringMode BluetoothEventTriggeringMode BluetoothEventTriggeringMode BluetoothEventTriggeringMode
Specifies when the trigger is activated.
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
Properties
Characteristic 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// You can use this property in JavaScript.
The GATT characteristic for which value change notifications are desired.
EventTriggeringMode 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// You can use this property in JavaScript.
- Value
- BluetoothEventTriggeringMode BluetoothEventTriggeringMode BluetoothEventTriggeringMode BluetoothEventTriggeringMode
The trigger mode.
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
- See Also