BluetoothGattCallback.OnConnectionStateChange Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.