GattCharacteristicNotificationTrigger Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GattCharacteristicNotificationTrigger(GattCharacteristic) |
Initializes a new instance of the GattCharacteristicNotificationTrigger class. |
GattCharacteristicNotificationTrigger(GattCharacteristic, BluetoothEventTriggeringMode) |
Initializes a new instance of the GattCharacteristicNotificationTrigger class with the specified characteristic and triggering mode. |
GattCharacteristicNotificationTrigger(GattCharacteristic)
Initializes a new instance of the GattCharacteristicNotificationTrigger class.
public:
GattCharacteristicNotificationTrigger(GattCharacteristic ^ characteristic);
GattCharacteristicNotificationTrigger(GattCharacteristic const& characteristic);
public GattCharacteristicNotificationTrigger(GattCharacteristic characteristic);
function GattCharacteristicNotificationTrigger(characteristic)
Public Sub New (characteristic As GattCharacteristic)
Parameters
- characteristic
- 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.
Applies to
GattCharacteristicNotificationTrigger(GattCharacteristic, BluetoothEventTriggeringMode)
Initializes a new instance of the GattCharacteristicNotificationTrigger class with the specified characteristic and triggering mode.
public:
GattCharacteristicNotificationTrigger(GattCharacteristic ^ characteristic, BluetoothEventTriggeringMode eventTriggeringMode);
GattCharacteristicNotificationTrigger(GattCharacteristic const& characteristic, BluetoothEventTriggeringMode const& eventTriggeringMode);
public GattCharacteristicNotificationTrigger(GattCharacteristic characteristic, BluetoothEventTriggeringMode eventTriggeringMode);
function GattCharacteristicNotificationTrigger(characteristic, eventTriggeringMode)
Public Sub New (characteristic As GattCharacteristic, eventTriggeringMode As BluetoothEventTriggeringMode)
Parameters
- characteristic
- GattCharacteristic
The GATT characteristic that you want value change notifications for.
- eventTriggeringMode
- BluetoothEventTriggeringMode
Specifies when the trigger is activated.
Windows requirements
Device family |
Windows 10 Creators Update (introduced in 10.0.15063.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v4.0)
|