BluetoothGattServerCallback.OnCharacteristicWriteRequest Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A remote client has requested to write to a local characteristic.
[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
Parameters
- device
- BluetoothDevice
The remote device that has requested the write operation
- requestId
- Int32
The Id of the request
- characteristic
- BluetoothGattCharacteristic
Characteristic to be written to.
- preparedWrite
- Boolean
true, if this write operation should be queued for later execution.
- responseNeeded
- Boolean
true, if the remote device requires a response
- offset
- Int32
The offset given for the value
- value
- Byte[]
The value the client wants to assign to the characteristic
- Attributes
Remarks
A remote client has requested to write to a local characteristic.
An application must call BluetoothGattServer#sendResponse
to complete the request.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.