DefaultGattServiceWrapper

Default implementation of ServiceWrapper

Parameters

gattService

Constructors

Link copied to clipboard
constructor(gattService: BluetoothGattService)

Properties

Link copied to clipboard

The list of CharacteristicWrapper associated with the service

Link copied to clipboard

The list of ServiceWrapper included in this service

Link copied to clipboard
open override val instanceId: Int

Returns the instance ID for this service. If a remote device offers multiple services with the same UUID (ex. multiple battery services for different batteries), the instance ID is used to distinguish services.

Link copied to clipboard
open override val type: ServiceWrapper.Type

The Type of this service (primary/secondary)

Link copied to clipboard
open override val uuid: UUID

The UUID of the service

Functions

Link copied to clipboard
open override fun addCharacteristic(characteristic: BluetoothGattCharacteristic): Boolean

Adds a BluetoothGattCharacteristic to the service

Link copied to clipboard
open override fun addService(service: BluetoothGattService): Boolean

Adds an included BluetoothGattService to the service

Link copied to clipboard
open override fun getCharacteristic(uuid: UUID): CharacteristicWrapper?

Gets the CharacteristicWrapper for the characteristic with a given java.util.UUID if it belongs to the service