Langue

BluetoothGattServerCallback.OnCharacteristicWriteRequest Méthode

Définition

Un client distant a demandé à écrire dans une caractéristique 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

Paramètres

device
BluetoothDevice

Appareil distant qui a demandé l’opération d’écriture

requestId
Int32

ID de la requête

characteristic
BluetoothGattCharacteristic

Caractéristique à écrire.

preparedWrite
Boolean

true, si cette opération d’écriture doit être mise en file d’attente pour une exécution ultérieure.

responseNeeded
Boolean

true, si l’appareil distant nécessite une réponse

offset
Int32

Décalage donné pour la valeur

value
Byte[]

Valeur que le client souhaite affecter à la caractéristique

Attributs

Remarques

Un client distant a demandé à écrire dans une caractéristique locale.

Une application doit appeler BluetoothGattServer#sendResponse pour terminer la demande.

Java documentation pour android.bluetooth.BluetoothGattServerCallback.onCharacteristicWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattCharacteristic, boolean, boolean, int, byte[]).

Les parties de cette page sont des modifications basées sur le travail créé et partagé par Android Open Source et utilisées en fonction des termes décrits dans la Creative Commons 2.5 Attribution License.

S’applique à