BluetoothGattServerCallback.OnCharacteristicWriteRequest Metodo

Definizione

Un client remoto ha richiesto di scrivere in una caratteristica locale.

[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

Parametri

device
BluetoothDevice

Dispositivo remoto che ha richiesto l'operazione di scrittura

requestId
Int32

ID della richiesta

characteristic
BluetoothGattCharacteristic

Caratteristica in cui scrivere.

preparedWrite
Boolean

true, se l'operazione di scrittura deve essere accodata per un'esecuzione successiva.

responseNeeded
Boolean

true, se il dispositivo remoto richiede una risposta

offset
Int32

Offset specificato per il valore

value
Byte[]

Valore che il client vuole assegnare alla caratteristica

Attributi

Commenti

Un client remoto ha richiesto di scrivere in una caratteristica locale.

Un'applicazione deve chiamare BluetoothGattServer#sendResponse per completare la richiesta.

per android.bluetooth.BluetoothGattServerCallback.onCharacteristicWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattCharacteristic, boolean, boolean, int, byte[]).

Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dalla e usati in base ai termini descritti in Creative License 2.5 Attribution License.

Si applica a