BluetoothGattService.GetCharacteristic(UUID) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从此服务提供的特征列表中返回具有给定 UUID 的特征。
[Android.Runtime.Register("getCharacteristic", "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattCharacteristic;", "GetGetCharacteristic_Ljava_util_UUID_Handler")]
public virtual Android.Bluetooth.BluetoothGattCharacteristic? GetCharacteristic(Java.Util.UUID? uuid);
[<Android.Runtime.Register("getCharacteristic", "(Ljava/util/UUID;)Landroid/bluetooth/BluetoothGattCharacteristic;", "GetGetCharacteristic_Ljava_util_UUID_Handler")>]
abstract member GetCharacteristic : Java.Util.UUID -> Android.Bluetooth.BluetoothGattCharacteristic
override this.GetCharacteristic : Java.Util.UUID -> Android.Bluetooth.BluetoothGattCharacteristic
参数
- uuid
- UUID
返回
如果未找到给定 UUID 的特征,则 GATT 特征对象或 null。
- 特性
注解
从此服务提供的特征列表中返回具有给定 UUID 的特征。
这是一个便利函数,允许访问给定的特征,而无需手动枚举返回 #getCharacteristics 的列表。
如果远程服务提供具有相同 UUID 的多个特征,则返回具有给定 UUID 的特征的第一个实例。
Java文档android.bluetooth.BluetoothGattService.getCharacteristic(java.util.UUID)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。