BluetoothGattCallback.OnConnectionStateChange Método

Definición

Devolución de llamada que indica cuándo el cliente GATT se ha conectado o desconectado hacia o desde un servidor GATT remoto.

[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

Parámetros

gatt
BluetoothGatt

Cliente GATT

status
GattStatus

Estado de la operación de conexión o desconexión. BluetoothGatt#GATT_SUCCESS si la operación se realiza correctamente.

newState
ProfileState

Devuelve el nuevo estado de conexión. Puede ser uno de BluetoothProfile#STATE_DISCONNECTED o BluetoothProfile#STATE_CONNECTED

Atributos

Comentarios

Devolución de llamada que indica cuándo el cliente GATT se ha conectado o desconectado hacia o desde un servidor GATT remoto.

Java documentación para android.bluetooth.BluetoothGattCallback.onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int).

Las partes de esta página son modificaciones basadas en el trabajo creado y compartido por el Android y se usan según los términos descritos en creative Creative Commons 2.5 Attribution License.

Se aplica a