Freigeben über


BluetoothGattServerCallback.OnConnectionStateChange Method

Definition

Callback indicating when a remote device has been connected or disconnected.

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

Parameters

device
BluetoothDevice

Remote device that has been connected or disconnected.

status
ProfileState

Status of the connect or disconnect operation.

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.BluetoothGattServerCallback.onConnectionStateChange(android.bluetooth.BluetoothDevice, 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