batteryLevelNotifications

fun Peripheral.batteryLevelNotifications(backpressure: BackpressureStrategy = BackpressureStrategy.Latest): Flow<Int>

Observes battery level notifications from the Battery Service (0x180F).

Return

Flow of battery percentages (0-100), or an empty flow if the characteristic is absent.

Parameters

backpressure

Strategy for handling notifications that arrive faster than the collector.