语言

BluetoothGattServer.GetService(UUID) 方法

定义

从此设备提供的服务列表中返回一个 BluetoothGattService 。

[Android.Runtime.Register("getService", "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattService;", "")]
public Android.Bluetooth.BluetoothGattService? GetService(Java.Util.UUID? uuid);
[<Android.Runtime.Register("getService", "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattService;", "")>]
member this.GetService : Java.Util.UUID -> Android.Bluetooth.BluetoothGattService

参数

uuid
UUID

所请求服务的 UUID

返回

如果支持蓝牙GattService,则为 null;如果此设备未提供所请求的服务,则为 null。

特性

注解

从此设备提供的服务列表中返回一个 BluetoothGattService 。

如果存在同一服务的多个实例(由 UUID 标识),则返回服务的第一个实例。

Java文档android.bluetooth.BluetoothGattServer.getService(java.util.UUID)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于