Langue

BluetoothGatt.WriteCharacteristic Méthode

Définition

Surcharges

Nom Description
WriteCharacteristic(BluetoothGattCharacteristic)

Écrit une caractéristique donnée et ses valeurs sur l’appareil distant associé.

WriteCharacteristic(BluetoothGattCharacteristic, Byte[], Int32)

Écrit une caractéristique donnée et ses valeurs sur l’appareil distant associé.

WriteCharacteristic(BluetoothGattCharacteristic)

Écrit une caractéristique donnée et ses valeurs sur l’appareil distant associé.

[Android.Runtime.Register("writeCharacteristic", "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool WriteCharacteristic(Android.Bluetooth.BluetoothGattCharacteristic? characteristic);
[<Android.Runtime.Register("writeCharacteristic", "(Landroid/bluetooth/BluetoothGattCharacteristic;)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.WriteCharacteristic : Android.Bluetooth.BluetoothGattCharacteristic -> bool

Paramètres

characteristic
BluetoothGattCharacteristic

Caractéristique de l’écriture sur l’appareil distant

Retours

true, si l’opération d’écriture a été lancée avec succès

Attributs

Remarques

Écrit une caractéristique donnée et ses valeurs sur l’appareil distant associé.

Une fois l’opération d’écriture terminée, le BluetoothGattCallback#onCharacteristicWrite rappel est appelé, signalant le résultat de l’opération.

Ce membre est déconseillé. L’utilisation BluetoothGatt#writeCharacteristic(BluetoothGattCharacteristic, byte[], int) n’est pas sécurisée en mémoire, car elle s’appuie sur un BluetoothGattCharacteristic objet dont les champs sous-jacents sont susceptibles de changer en dehors de cette méthode.

Java documentation pour android.bluetooth.BluetoothGatt.writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic).

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 à

WriteCharacteristic(BluetoothGattCharacteristic, Byte[], Int32)

Écrit une caractéristique donnée et ses valeurs sur l’appareil distant associé.

[Android.Runtime.Register("writeCharacteristic", "(Landroid/bluetooth/BluetoothGattCharacteristic;[BI)I", "", ApiSince=33)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public int WriteCharacteristic(Android.Bluetooth.BluetoothGattCharacteristic characteristic, byte[] value, int writeType);
[<Android.Runtime.Register("writeCharacteristic", "(Landroid/bluetooth/BluetoothGattCharacteristic;[BI)I", "", ApiSince=33)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.WriteCharacteristic : Android.Bluetooth.BluetoothGattCharacteristic * byte[] * int -> int

Paramètres

characteristic
BluetoothGattCharacteristic

Caractéristique de l’écriture sur l’appareil distant

value
Byte[]
writeType
Int32

La valeur est l’une des valeurs suivantes : BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT ; BluetoothGattCharacteristic.WRITE_TYPE_NO_RESPONSE ; BluetoothGattCharacteristic.WRITE_TYPE_SIGNED

Retours

si la caractéristique a été correctement écrite dans

Attributs

Remarques

Écrit une caractéristique donnée et ses valeurs sur l’appareil distant associé.

Une fois l’opération d’écriture terminée, le BluetoothGattCallback#onCharacteristicWrite rappel est appelé, signalant le résultat de l’opération.

Java documentation pour android.bluetooth.BluetoothGatt.writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic, byte[], 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 à