Skip to Content

Kotlin

Use Blerivo from Kotlin.

Not published yet

The Kotlin bindings are not on any package registry yet. Build them from the repository.

The Kotlin SDK is for Android, through UniFFI bindings generated into crates/ffi/dist.

Build the bindings

Terminal
pnpm install
pnpm --filter @blerivo/ffi build

This builds blerivo-ffi in release mode and writes the Kotlin and Swift sources to crates/ffi/dist, next to the native library in target/release.

The API

WatchSession has one constructor per protocol, such as moyoung or kaha, plus handle(event) and saved_state(). Names follow Kotlin conventions. See Sessions for the loop and Protocols for each constructor's arguments.

Stub

A step-by-step guide that wires the session to the platform's Bluetooth APIs is still to be written.

See also

On this page