MultiService

abstract class MultiService(requiredServiceUuids: List<Uuid>, optionalServiceUuids: List<Uuid> = emptyList(), name: String? = null) : Profile

A class representing a multiservice GATT profile.

This is intended for profiles that have multiple GATT services, i.e. Proximity Profile.

Note, the prepare method may be called with a list of services containing multiple instances of the same service if returned by the service discovery. For example, if a device has multiple batteries, it may expose their level with a Battery Service for each of them.

Parameters

requiredServiceUuids

A list of UUIDs of required profile GATT services.

optionalServiceUuids

A list of UUIDs of optional profile GATT services.

name

The name of the profile. This is for convenience, used only in logging.

Constructors

Link copied to clipboard
constructor(requiredServiceUuids: List<Uuid>, optionalServiceUuids: List<Uuid> = emptyList(), name: String? = null)

Properties

Link copied to clipboard
val name: String?

The name of the profile. This is for convenience, used only in logging.