BluetoothManager.GetConnectedDevices(ProfileType) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得符合指定配置檔的連接裝置。
[Android.Runtime.Register("getConnectedDevices", "(I)Ljava/util/List;", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public System.Collections.Generic.IList<Android.Bluetooth.BluetoothDevice>? GetConnectedDevices(Android.Bluetooth.ProfileType profile);
[<Android.Runtime.Register("getConnectedDevices", "(I)Ljava/util/List;", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.GetConnectedDevices : Android.Bluetooth.ProfileType -> System.Collections.Generic.IList<Android.Bluetooth.BluetoothDevice>
參數
- profile
- ProfileType
GATT 或 GATT_SERVER
傳回
裝置清單。 錯誤時清單會是空的。
- 屬性
備註
取得符合指定配置檔的連接裝置。
回傳處於狀態的裝置集合 BluetoothProfile#STATE_CONNECTED
這並非特定於任何應用程式設定,而是代表此配置檔藍牙的連線狀態。 這可以用來做像狀態列這類只想知道藍牙狀態的應用程式。
Java 文件 android.bluetooth.BluetoothManager.getConnectedDevices(int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。