Share via


BluetoothGattCallback.OnCharacteristicChanged Method

Definition

Overloads

OnCharacteristicChanged(BluetoothGatt, BluetoothGattCharacteristic)

Callback triggered as a result of a remote characteristic notification.

OnCharacteristicChanged(BluetoothGatt, BluetoothGattCharacteristic, Byte[])

Callback triggered as a result of a remote characteristic notification.

OnCharacteristicChanged(BluetoothGatt, BluetoothGattCharacteristic)

Callback triggered as a result of a remote characteristic notification.

[Android.Runtime.Register("onCharacteristicChanged", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;)V", "GetOnCharacteristicChanged_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_Handler")]
public virtual void OnCharacteristicChanged (Android.Bluetooth.BluetoothGatt? gatt, Android.Bluetooth.BluetoothGattCharacteristic? characteristic);
[<Android.Runtime.Register("onCharacteristicChanged", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;)V", "GetOnCharacteristicChanged_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_Handler")>]
abstract member OnCharacteristicChanged : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic -> unit
override this.OnCharacteristicChanged : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic -> unit

Parameters

gatt
BluetoothGatt

GATT client the characteristic is associated with

characteristic
BluetoothGattCharacteristic

Characteristic that has been updated as a result of a remote notification event.

Attributes

Remarks

Callback triggered as a result of a remote characteristic notification.

This member is deprecated. Use BluetoothGattCallback#onCharacteristicChanged(BluetoothGatt, BluetoothGattCharacteristic, byte[]) as it is memory safe by providing the characteristic value at the time of notification.

Java documentation for android.bluetooth.BluetoothGattCallback.onCharacteristicChanged(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

OnCharacteristicChanged(BluetoothGatt, BluetoothGattCharacteristic, Byte[])

Callback triggered as a result of a remote characteristic notification.

[Android.Runtime.Register("onCharacteristicChanged", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[B)V", "GetOnCharacteristicChanged_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_arrayBHandler", ApiSince=33)]
public virtual void OnCharacteristicChanged (Android.Bluetooth.BluetoothGatt gatt, Android.Bluetooth.BluetoothGattCharacteristic characteristic, byte[] value);
[<Android.Runtime.Register("onCharacteristicChanged", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;[B)V", "GetOnCharacteristicChanged_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_arrayBHandler", ApiSince=33)>]
abstract member OnCharacteristicChanged : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * byte[] -> unit
override this.OnCharacteristicChanged : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * byte[] -> unit

Parameters

gatt
BluetoothGatt

GATT client the characteristic is associated with

characteristic
BluetoothGattCharacteristic

Characteristic that has been updated as a result of a remote notification event.

value
Byte[]

notified characteristic value

Attributes

Remarks

Callback triggered as a result of a remote characteristic notification. Note that the value within the characteristic object may have changed since receiving the remote characteristic notification, so check the parameter value for the value at the time of notification.

Java documentation for android.bluetooth.BluetoothGattCallback.onCharacteristicChanged(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, byte[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to