语言

BluetoothGattServerCallback.OnDescriptorWriteRequest 方法

定义

远程客户端已请求写入本地描述符。

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

参数

device
BluetoothDevice

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

requestId
Int32

请求的 ID

descriptor
BluetoothGattDescriptor

要写入的描述符。

preparedWrite
Boolean

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

responseNeeded
Boolean

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

offset
Int32

为值给定的偏移量

value
Byte[]

客户端要分配给描述符的值

特性

注解

远程客户端已请求写入本地描述符。

应用程序必须调用 BluetoothGattServer#sendResponse 才能完成请求。

Java文档android.bluetooth.BluetoothGattServerCallback.onDescriptorWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattDescriptor, boolean, boolean, int, byte[])。

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

适用于