语言

BluetoothHidDevice.Callback.OnConnectionStateChanged 方法

定义

更改远程主机的连接状态时调用的回调。

[Android.Runtime.Register("onConnectionStateChanged", "(Landroid/bluetooth/BluetoothDevice;I)V", "GetOnConnectionStateChanged_Landroid_bluetooth_BluetoothDevice_IHandler", ApiSince=28)]
public virtual void OnConnectionStateChanged(Android.Bluetooth.BluetoothDevice? device, Android.Bluetooth.ProfileState state);
[<Android.Runtime.Register("onConnectionStateChanged", "(Landroid/bluetooth/BluetoothDevice;I)V", "GetOnConnectionStateChanged_Landroid_bluetooth_BluetoothDevice_IHandler", ApiSince=28)>]
abstract member OnConnectionStateChanged : Android.Bluetooth.BluetoothDevice * Android.Bluetooth.ProfileState -> unit
override this.OnConnectionStateChanged : Android.Bluetooth.BluetoothDevice * Android.Bluetooth.ProfileState -> unit

参数

device
BluetoothDevice

BluetoothDevice 对象,表示已更改连接状态的主机设备。

state
ProfileState

在 . 中 BluetoothProfile定义的连接状态。

特性

注解

更改远程主机的连接状态时调用的回调。 应用程序可以假定使用 调用 BluetoothProfile#STATE_CONNECTEDstate时建立虚拟电缆。

Java文档android.bluetooth.BluetoothHidDevice.Callback.onConnectionStateChanged(android.bluetooth.BluetoothDevice, int)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于