BluetoothGattServerCallback.OnCharacteristicWriteRequest 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
遠端用戶端請求寫入本地特徵。
[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 完成申請。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。