语言

BluetoothGattCallback.OnCharacteristicWrite 方法

定义

指示特征写入操作结果的回调。

[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

参数

gatt
BluetoothGatt

调用的 GATT 客户端 BluetoothGatt#writeCharacteristic(BluetoothGattCharacteristic, byte[], int)

characteristic
BluetoothGattCharacteristic

写入关联远程设备的特征。

status
GattStatus

如果操作成功,则写入操作 BluetoothGatt#GATT_SUCCESS 的结果。

特性

注解

指示特征写入操作结果的回调。

如果在进行可靠写入事务时调用此回调,则特征的值表示远程设备报告的值。 应用程序应将此值与要写入的所需值进行比较。 如果值不匹配,应用程序必须中止可靠的写入事务。

Java文档android.bluetooth.BluetoothGattCallback.onCharacteristicWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于