GattService


public final class GattService


Represents a Bluetooth GATT service.

Summary

Public constructors

GattService(
    @NonNull UUID uuid,
    @NonNull List<@NonNull GattCharacteristic> characteristics
)

Public methods

final GattCharacteristic

Gets a GattCharacteristic in the service with the given UUID.

final @NonNull List<@NonNull GattCharacteristic>

a list of characteristics included in the service

final @NonNull UUID

the UUID of the service

Public constructors

GattService

Added in 1.0.0-alpha02
public GattService(
    @NonNull UUID uuid,
    @NonNull List<@NonNull GattCharacteristic> characteristics
)

Public methods

getCharacteristic

Added in 1.0.0-alpha02
public final GattCharacteristic getCharacteristic(@NonNull UUID uuid)

Gets a GattCharacteristic in the service with the given UUID.

If the service includes multiple characteristics with the same UUID, the first instance is returned.

getCharacteristics

Added in 1.0.0-alpha02
public final @NonNull List<@NonNull GattCharacteristicgetCharacteristics()

a list of characteristics included in the service

getUuid

Added in 1.0.0-alpha02
public final @NonNull UUID getUuid()

the UUID of the service