BluetoothGattService.GetCharacteristic(UUID) Method

Definition

Returns a characteristic with a given UUID out of the list of characteristics offered by this service.

[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

Parameters

uuid
UUID

Returns

GATT characteristic object or null if no characteristic with the given UUID was found.

Attributes

Remarks

Returns a characteristic with a given UUID out of the list of characteristics offered by this service.

This is a convenience function to allow access to a given characteristic without enumerating over the list returned by #getCharacteristics manually.

If a remote service offers multiple characteristics with the same UUID, the first instance of a characteristic with the given UUID is returned.

Java documentation for android.bluetooth.BluetoothGattService.getCharacteristic(java.util.UUID).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to