Langue

BluetoothGattCallback.OnCharacteristicWrite Méthode

Définition

Rappel indiquant le résultat d’une opération d’écriture caractéristique.

[Android.Runtime.Register("onCharacteristicWrite", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V", "GetOnCharacteristicWrite_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_IHandler")]
public virtual void OnCharacteristicWrite(Android.Bluetooth.BluetoothGatt? gatt, Android.Bluetooth.BluetoothGattCharacteristic? characteristic, Android.Bluetooth.GattStatus status);
[<Android.Runtime.Register("onCharacteristicWrite", "(Landroid/bluetooth/BluetoothGatt;Landroid/bluetooth/BluetoothGattCharacteristic;I)V", "GetOnCharacteristicWrite_Landroid_bluetooth_BluetoothGatt_Landroid_bluetooth_BluetoothGattCharacteristic_IHandler")>]
abstract member OnCharacteristicWrite : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * Android.Bluetooth.GattStatus -> unit
override this.OnCharacteristicWrite : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.BluetoothGattCharacteristic * Android.Bluetooth.GattStatus -> unit

Paramètres

gatt
BluetoothGatt

Client GATT qui a appelé BluetoothGatt#writeCharacteristic(BluetoothGattCharacteristic, byte[], int)

characteristic
BluetoothGattCharacteristic

Caractéristique écrite sur l’appareil distant associé.

status
GattStatus

Résultat de l’opération BluetoothGatt#GATT_SUCCESS d’écriture si l’opération réussit.

Attributs

Remarques

Rappel indiquant le résultat d’une opération d’écriture caractéristique.

Si ce rappel est appelé alors qu’une transaction d’écriture fiable est en cours, la valeur de la caractéristique représente la valeur signalée par l’appareil distant. Une application doit comparer cette valeur à la valeur souhaitée à écrire. Si les valeurs ne correspondent pas, l’application doit abandonner la transaction d’écriture fiable.

Java documentation pour android.bluetooth.BluetoothGattCallback.onCharacteristicWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int).

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 à