BluetoothHidDevice.Callback.OnConnectionStateChanged 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當與遠端主機的連線狀態改變時,回調會被呼叫。
[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已建立。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。