BluetoothGattServerCallback.OnConnectionStateChange 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指示远程设备何时连接或断开连接的回调。
[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
参数
- device
- BluetoothDevice
已连接或断开连接的远程设备。
- status
- ProfileState
连接或断开连接操作的状态。
- newState
- ProfileState
返回新的连接状态。 可以是其中 BluetoothProfile#STATE_DISCONNECTED 一个或 BluetoothProfile#STATE_CONNECTED
- 特性
注解
指示远程设备何时连接或断开连接的回调。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。