語言

BluetoothGattServerCallback.OnConnectionStateChange 方法

定義

回撥顯示遠端裝置何時已連接或斷線。

[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

屬性

備註

回撥顯示遠端裝置何時已連接或斷線。

Java 文件 android.bluetooth.BluetoothGattServerCallback.onConnectionStateChange(android.bluetooth.BluetoothDevice, int, int)

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於