An Android library that can connect to a Bluetooth LE device, download diagnostics data and upload them to the Memfault console.
The device should contain characteristics defined in the Memfault documentation.
val manager = MemfaultDiagnosticsManager.create(context)
// Receive status and data:
manager.state.collect {
// [...]
}
// Connect and start observing diagnostics data:
manager.connect(peripheral, centralManager) // Using Kotlin BLE Library
// or
manager.connect(context, device) // Using the legacy code
// When finished:
manager.disconnect()
Dokka documentation can be found here.
The library is available on Maven Central repository. Add it to your project by adding the following dependency:
implementation 'no.nordicsemi.android:memfault-observability:2.0.0'
Application under the hood uses:
- Kotlin BLE Library - for managing BLE connection and reading data from the remote device.
- MemfaultCloud Android - for uploading chunks to the cloud.