BluetoothGattCallback.OnConnectionStateChange Method

Definition

Callback indicating when GATT client has connected/disconnected to/from a remote GATT server.

[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

Parameters

gatt
BluetoothGatt

GATT client

status
GattStatus

Status of the connect or disconnect operation. BluetoothGatt#GATT_SUCCESS if the operation succeeds.

newState
ProfileState

Returns the new connection state. Can be one of BluetoothProfile#STATE_DISCONNECTED or BluetoothProfile#STATE_CONNECTED

Attributes

Remarks

Java documentation for android.bluetooth.BluetoothGattCallback.onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to