Share via


GattCharacteristic.ValueChanged Event

Definition

An App can register an event handler in order to receive events when notification or indications are received from a device, after setting the Client Characteristic Configuration Descriptor.

// Register
event_token ValueChanged(TypedEventHandler<GattCharacteristic, GattValueChangedEventArgs const&> const& handler) const;

// Revoke with event_token
void ValueChanged(event_token const* cookie) const;

// Revoke with event_revoker
GattCharacteristic::ValueChanged_revoker ValueChanged(auto_revoke_t, TypedEventHandler<GattCharacteristic, GattValueChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<GattCharacteristic,GattValueChangedEventArgs> ValueChanged;
function onValueChanged(eventArgs) { /* Your code */ }
gattCharacteristic.addEventListener("valuechanged", onValueChanged);
gattCharacteristic.removeEventListener("valuechanged", onValueChanged);
- or -
gattCharacteristic.onvaluechanged = onValueChanged;
Public Custom Event ValueChanged As TypedEventHandler(Of GattCharacteristic, GattValueChangedEventArgs) 

Event Type

Windows requirements

App capabilities
bluetooth

Remarks

The GattValueChangedEventArgs object represents the arguments received by a ValueChanged event handler used to process characteristic value change notification and indication events sent by a Bluetooth LE device.

Applies to

See also