Idioma

BluetoothGattCallback.OnConnectionStateChange Método

Definição

Retorno de chamada que indica quando o cliente GATT se conectou/desconectou de/para um 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

Status da operação de conexão ou desconexão. BluetoothGatt#GATT_SUCCESS se a operação for bem-sucedida.

newState
ProfileState

Retorna o novo estado de conexão. Pode ser um de BluetoothProfile#STATE_DISCONNECTED ou BluetoothProfile#STATE_CONNECTED

Atributos

Comentários

Retorno de chamada que indica quando o cliente GATT se conectou/desconectou de/para um servidor GATT remoto.

Java documentação para android.bluetooth.BluetoothGattCallback.onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int).

Partes desta página são modificações baseadas no trabalho criado e compartilhado pelo Project Open Source do Open Source e usadas de acordo com os termos descritos na Creative Commons 2.5.

Aplica-se a