BluetoothGattCallback.OnCharacteristicWrite 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指示特征写入操作结果的回调。
[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 的结果。
- 特性
注解
指示特征写入操作结果的回调。
如果在进行可靠写入事务时调用此回调,则特征的值表示远程设备报告的值。 应用程序应将此值与要写入的所需值进行比较。 如果值不匹配,应用程序必须中止可靠的写入事务。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。