Share via


BluetoothGattCallback.OnCharacteristicWrite Method

Definition

Callback indicating the result of a characteristic write operation.

[Android.Runtime.Register("onCharacteristicWrite", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V", "GetOnCharacteristicWrite_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_IHandler")]
public virtual void OnCharacteristicWrite (Android.Bluetooth.BluetoothGatt? gatt, Android.Bluetooth.BluetoothGattCharacteristic? characteristic, Android.Bluetooth.GattStatus status);
[<Android.Runtime.Register("onCharacteristicWrite", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V", "GetOnCharacteristicWrite_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_IHandler")>]
abstract member OnCharacteristicWrite : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * Android.Bluetooth.GattStatus -> unit
override this.OnCharacteristicWrite : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * Android.Bluetooth.GattStatus -> unit

Parameters

gatt
BluetoothGatt

GATT client that invoked BluetoothGatt#writeCharacteristic(BluetoothGattCharacteristic, byte[], int)

characteristic
BluetoothGattCharacteristic

Characteristic that was written to the associated remote device.

status
GattStatus

The result of the write operation BluetoothGatt#GATT_SUCCESS if the operation succeeds.

Attributes

Remarks

Callback indicating the result of a characteristic write operation.

If this callback is invoked while a reliable write transaction is in progress, the value of the characteristic represents the value reported by the remote device. An application should compare this value to the desired value to be written. If the values don't match, the application must abort the reliable write transaction.

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

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