Skip to content

//kotlin-sdk/fr.gasmartbuilding.gasmartaccessreadersdk/PeripheralManager

PeripheralManager

class PeripheralManager(flowAppSDK: GASmartAccessReaderSDK, context: Context, callbacks: GASmartAccessReaderCallbacks)

Manages BLE peripheral functionalities within the GASmartAccessReaderSDK.

Responsibilities:

  1. Initialize and manage BLE GATT services and characteristics.
  2. Handle BLE advertising start, stop, and callbacks.
  3. Handle incoming write requests to characteristics and respond accordingly.
  4. Monitor and log BLE connection state changes.

Note: Requires relevant Bluetooth permissions to function properly.

Parameters

androidJvm

flowAppSDK Reference to the parent SDK for utility functions.
context Application context required for system services and permission checks.

Constructors

PeripheralManager [androidJvm]
constructor(flowAppSDK: GASmartAccessReaderSDK, context: Context, callbacks: GASmartAccessReaderCallbacks)

Types

Name Summary
Companion [androidJvm]
object Companion

Functions

Name Summary
startAdvertising [androidJvm]
fun startAdvertising(context: Context)
Starts BLE advertising and sets up the GATT server.
stopAdvertising [androidJvm]
fun stopAdvertising(context: Context)
Stops BLE advertising.