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
- 屬性
備註
回撥顯示遠端裝置何時已連接或斷線。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。