Bluetooth

This library provides out-of-the-box access to Bluetooth. It is an aggregate of the individual Bluetooth modules, bundling them behind a single BluetoothBuilder:

Depend on this module to get everything at once, or depend on the individual modules to only include what you need.

Installing

This library is available on Maven Central. You can import Kaluga Bluetooth as follows:

repositories {
    // ...
    mavenCentral()
}
// ...
dependencies {
    // ...
    implementation("com.splendo.kaluga:bluetooth:$kalugaVersion")
}

Usage

Check out the full documentation

The BluetoothBuilder creates both Client and Server objects:

  • Use BluetoothBuilder.createClient() to create a BluetoothClient. See bluetooth-client for usage.
  • Use BluetoothBuilder.createServer() to create a BluetoothServer. See bluetooth-server for usage.

For (de)serializing data exchanged over Bluetooth, see the BluetoothFormat documentation in bluetooth-base.

Testing

Use the test-utils-bluetooth-client module to get mockable Bluetooth classes.