語言

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

請求的本我

characteristic
BluetoothGattCharacteristic

值得寫信的特徵。

preparedWrite
Boolean

如果這個寫入操作應該排隊等待後續執行,則為真。

responseNeeded
Boolean

如果遠端裝置需要回應,則為真

offset
Int32

該值的偏移量

value
Byte[]

客戶希望賦予特徵的價值

屬性

備註

遠端用戶端請求寫入本地特徵。

申請必須打電話 BluetoothGattServer#sendResponse 完成申請。

Java 文件 android.bluetooth.BluetoothGattServerCallback.onCharacteristicWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattCharacteristic, boolean, boolean, int, byte[])。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於