Now, ksensor can monitor Bluetooth connections. On...
# feed
s
Now, ksensor can monitor Bluetooth connections. On each connect/disconnect, you will receive a list of connected devices, including their device ID and name. https://github.com/ShadAdman/KSensor
K 17
j
Built a small Compose Multiplatform demo to show off KSensor, sixteen everyday phone features, one per sensor or device state, I had some spare implementations, and easily replaced by the library... Android and iOS from a single codebase. Shake to file a bug, dim the page in the dark, roll a marble around by tilting, hide your bank balance when the app loses focus, that sort of thing. Great work @Shadman The repo: https://github.com/jacksonmafra-umain/aware Fair warning: I also found a few sharp edges on 3.80.0 while building it. The types live under
org.kmp.ksensor
even though the coordinate says `shadadman`; the Android accelerometer arrives divided by the sensor's max range;
VolumeStatus
is a 0–100 percentage on iOS but a raw stream index on Android;
addObserver
crashes if you pass more than one
StateType
because
awaitClose
runs once per type;
TOUCH_GESTURES
emits nothing because the touch monitor's
init()
is never called; and iOS volume only reports once. Happy to open proper issues rather than just be smug about it in a thread. Genuinely useful library either way, it saved writing a lot of platform glue twice.
🔥 2