Langage

BluetoothGattServerCallback.OnCharacteristicReadRequest Méthode

Définition

Un client distant a demandé de lire une caractéristique locale.

[Android.Runtime.Register("onCharacteristicReadRequest", "(Landroid/bluetooth/BluetoothDevice;IILandroid/bluetooth/BluetoothGattCharacteristic;)V", "GetOnCharacteristicReadRequest_Landroid_bluetooth_BluetoothDevice_IILandroid_bluetooth_BluetoothGattCharacteristic_Handler")]
public virtual void OnCharacteristicReadRequest(Android.Bluetooth.BluetoothDevice? device, int requestId, int offset, Android.Bluetooth.BluetoothGattCharacteristic? characteristic);
[<Android.Runtime.Register("onCharacteristicReadRequest", "(Landroid/bluetooth/BluetoothDevice;IILandroid/bluetooth/BluetoothGattCharacteristic;)V", "GetOnCharacteristicReadRequest_Landroid_bluetooth_BluetoothDevice_IILandroid_bluetooth_BluetoothGattCharacteristic_Handler")>]
abstract member OnCharacteristicReadRequest : Android.Bluetooth.BluetoothDevice * int * int * Android.Bluetooth.BluetoothGattCharacteristic -> unit
override this.OnCharacteristicReadRequest : Android.Bluetooth.BluetoothDevice * int * int * Android.Bluetooth.BluetoothGattCharacteristic -> unit

Paramètres

device
BluetoothDevice

Appareil distant qui a demandé l’opération de lecture

requestId
Int32

ID de la requête

offset
Int32

Décalage dans la valeur de la caractéristique

characteristic
BluetoothGattCharacteristic

Caractéristique à lire

Attributs

Remarques

Un client distant a demandé de lire une caractéristique locale.

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

Java documentation pour android.bluetooth.BluetoothGattServerCallback.onCharacteristicReadRequest(android.bluetooth.BluetoothDevice, int, int, 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 à