語言

BluetoothGatt.DiscoverServices 方法

定義

發現遠端裝置所提供的服務及其特性與描述。

[Android.Runtime.Register("discoverServices", "()Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool DiscoverServices();
[<Android.Runtime.Register("discoverServices", "()Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.DiscoverServices : unit -> bool

傳回

如果遠端服務發現已經啟動,這是真的

屬性

備註

發現遠端裝置所提供的服務及其特性與描述。

這是異步操作。 服務發現完成後, BluetoothGattCallback#onServicesDiscovered 回調會被觸發。 若發現成功,可透過函 #getServices 式檢索遠端服務。

Java 文件 android.bluetooth.BluetoothGatt.discoverServices()。

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

適用於