BluetoothGattServerCallback.OnCharacteristicReadRequest 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
远程客户端已请求读取本地特征。
[Android.Runtime.Register("onCharacteristicReadRequest", "(Landroid/bluetooth/BluetoothDevice;IILandroid/bluetooth/BluetoothGattCharacteristic;)V", "GetOnCharacteristicReadRequest_Landroid_bluetooth_BluetoothDevice_IILandroid_bluetooth_BluetoothGattCharacteristic_Handler")]
public virtual void OnCharacteristicReadRequest(Android.Bluetooth.BluetoothDevice? device, int requestId, int offset, Android.Bluetooth.BluetoothGattCharacteristic? characteristic);
[<Android.Runtime.Register("onCharacteristicReadRequest", "(Landroid/bluetooth/BluetoothDevice;IILandroid/bluetooth/BluetoothGattCharacteristic;)V", "GetOnCharacteristicReadRequest_Landroid_bluetooth_BluetoothDevice_IILandroid_bluetooth_BluetoothGattCharacteristic_Handler")>]
abstract member OnCharacteristicReadRequest : Android.Bluetooth.BluetoothDevice * int * int * Android.Bluetooth.BluetoothGattCharacteristic -> unit
override this.OnCharacteristicReadRequest : Android.Bluetooth.BluetoothDevice * int * int * Android.Bluetooth.BluetoothGattCharacteristic -> unit
参数
- device
- BluetoothDevice
已请求读取操作的远程设备
- requestId
- Int32
请求的 ID
- offset
- Int32
偏移到特征的值
- characteristic
- BluetoothGattCharacteristic
要读取的特征
- 属性
注解
远程客户端已请求读取本地特征。
应用程序必须调用 BluetoothGattServer#sendResponse 才能完成请求。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。