BluetoothGattCallback.OnConnectionStateChange 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回調顯示 GATT 用戶端何時連接/斷開遠端 GATT 伺服器。
[Android.Runtime.Register("onConnectionStateChange", "(Landroid/bluetooth/BluetoothGatt;II)V", "GetOnConnectionStateChange_Landroid_bluetooth_BluetoothGatt_IIHandler")]
public virtual void OnConnectionStateChange(Android.Bluetooth.BluetoothGatt? gatt, Android.Bluetooth.GattStatus status, Android.Bluetooth.ProfileState newState);
[<Android.Runtime.Register("onConnectionStateChange", "(Landroid/bluetooth/BluetoothGatt;II)V", "GetOnConnectionStateChange_Landroid_bluetooth_BluetoothGatt_IIHandler")>]
abstract member OnConnectionStateChange : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.GattStatus * Android.Bluetooth.ProfileState -> unit
override this.OnConnectionStateChange : Android.Bluetooth.BluetoothGatt * Android.Bluetooth.GattStatus * Android.Bluetooth.ProfileState -> unit
參數
- gatt
- BluetoothGatt
GATT 用戶端
- status
- GattStatus
連接或斷開操作狀態。
BluetoothGatt#GATT_SUCCESS 如果手術成功。
- newState
- ProfileState
會回傳新的連線狀態。 可以是其中 BluetoothProfile#STATE_DISCONNECTED 之一或 BluetoothProfile#STATE_CONNECTED
- 屬性
備註
回調顯示 GATT 用戶端何時連接/斷開遠端 GATT 伺服器。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。