Langue

BluetoothGattCallback.OnConnectionStateChange Méthode

Définition

Rappel indiquant quand le client GATT a connecté/déconnecté vers/depuis un serveur GATT distant.

[Android.Runtime.Register("onConnectionStateChange", "(Landroid/bluetooth/BluetoothGatt;II)V", "GetOnConnectionStateChange_Landroid_bluetooth_BluetoothGatt_IIHandler")]
public virtual void OnConnectionStateChange(Android.Bluetooth.BluetoothGatt? gatt, Android.Bluetooth.GattStatus status, Android.Bluetooth.ProfileState newState);
[<Android.Runtime.Register("onConnectionStateChange", "(Landroid/bluetooth/BluetoothGatt;II)V", "GetOnConnectionStateChange_Landroid_bluetooth_BluetoothGatt_IIHandler")>]
abstract member OnConnectionStateChange : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.GattStatus * Android.Bluetooth.ProfileState -> unit
override this.OnConnectionStateChange : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.GattStatus * Android.Bluetooth.ProfileState -> unit

Paramètres

gatt
BluetoothGatt

Client GATT

status
GattStatus

État de l’opération de connexion ou de déconnexion. BluetoothGatt#GATT_SUCCESS si l’opération réussit.

newState
ProfileState

Retourne le nouvel état de connexion. Peut être l’un des BluetoothProfile#STATE_DISCONNECTED ou BluetoothProfile#STATE_CONNECTED

Attributs

Remarques

Rappel indiquant quand le client GATT a connecté/déconnecté vers/depuis un serveur GATT distant.

Java documentation pour android.bluetooth.BluetoothGattCallback.onConnectionStateChange(android.bluetooth.BluetoothGatt, int, 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 à