BluetoothGattServerCallback.OnCharacteristicWriteRequest 方法

定义

远程客户端已请求写入本地特征。

[Android.Runtime.Register("onCharacteristicWriteRequest", "(Landroid/bluetooth/BluetoothDevice;ILandroid/bluetooth/BluetoothGattCharacteristic;ZZI[B)V", "GetOnCharacteristicWriteRequest_Landroid_bluetooth_BluetoothDevice_ILandroid_bluetooth_BluetoothGattCharacteristic_ZZIarrayBHandler")]
public virtual void OnCharacteristicWriteRequest (Android.Bluetooth.BluetoothDevice? device, int requestId, Android.Bluetooth.BluetoothGattCharacteristic? characteristic, bool preparedWrite, bool responseNeeded, int offset, byte[]? value);
[<Android.Runtime.Register("onCharacteristicWriteRequest", "(Landroid/bluetooth/BluetoothDevice;ILandroid/bluetooth/BluetoothGattCharacteristic;ZZI[B)V", "GetOnCharacteristicWriteRequest_Landroid_bluetooth_BluetoothDevice_ILandroid_bluetooth_BluetoothGattCharacteristic_ZZIarrayBHandler")>]
abstract member OnCharacteristicWriteRequest : Android.Bluetooth.BluetoothDevice * int * Android.Bluetooth.BluetoothGattCharacteristic * bool * bool * int * byte[] -> unit
override this.OnCharacteristicWriteRequest : Android.Bluetooth.BluetoothDevice * int * Android.Bluetooth.BluetoothGattCharacteristic * bool * bool * int * byte[] -> unit

参数

device
BluetoothDevice

已请求写入操作的远程设备

requestId
Int32

请求的 ID

characteristic
BluetoothGattCharacteristic

要写入的特征。

preparedWrite
Boolean

如果此写入操作应排队等待后续执行,则为 true。

responseNeeded
Boolean

如果远程设备需要响应,则为 true

offset
Int32

为值给定的偏移量

value
Byte[]

客户端要分配给特征的值

属性

注解

适用于 . 的 android.bluetooth.BluetoothGattServerCallback.onCharacteristicWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattCharacteristic, boolean, boolean, int, byte[])Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于