Langue

BluetoothGatt.ReadCharacteristic(BluetoothGattCharacteristic) Méthode

Définition

Lit la caractéristique demandée à partir de l’appareil distant associé.

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

Paramètres

characteristic
BluetoothGattCharacteristic

Caractéristique à lire à partir de l’appareil distant

Retours

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

Attributs

Remarques

Lit la caractéristique demandée à partir de l’appareil distant associé.

Il s’agit d’une opération asynchrone. Le résultat de l’opération de lecture est signalé par le BluetoothGattCallback#onCharacteristicRead(BluetoothGatt, BluetoothGattCharacteristic, byte[], int) rappel.

Java documentation pour android.bluetooth.BluetoothGatt.readCharacteristic(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 à