© Combustion 2022 – DRAFT 0.1
Android Communication Library for Combustion Inc.
Overview
This project enables BLE communication with Combustion Inc. Predictive Thermometers using Android smartphones. The library is written in Kotlin targeting Android OS and is distributed as an Android Archive for incorporation into your apps.
The library provides an Android Service with a simple API to discover and receive temperature data from Combustion Inc. thermometers. The library uses Kotlin flows as the communication mechanism to deliver data and state asynchronously to your app's UI components.
The library allows third-party apps to
- Scan for and be notified of in-range thermometers.
- Receive real-time temperature updates from thermometers.
- Connect to and transfer the temperature logs from thermometers.
- Be notified of global events such as device connection, disconnection, or Bluetooth enable and disable.
There are more features on our roadmap below. So please explore and let us know what you think!
Using the Library
A straightforward example Android app illustrating the use of this framework is available at the combustion-android-example repo. The example uses Jetpack Compose and follows Android's Guide to App Architecture with example UI Layer code for interacting with this library as the Data Layer.
The API
The public API and data access objects are contained in the inc.combustion.framework.service package. The DeviceManager
class is the primary entrypoint for the API and encapsulates the Combustion Service. See the DeviceManager
source documentation for more details on the API.
The CombustionService
manages the communications and data buffer with Combustion devices. The service can optionally be run in the Foreground, ensuring that it is long-lived, by passing a foreground notification when starting the service. If your use-case is lighter weight and only needs to access BLE advertisements from the probe, then you can use the ProbeScanner
and ProbeScanResult
.
The Android example provides more detail on using these APIs.
Adding the Library to Your Project
You can find our library on JitPack. Go to that page for instructions on setting up your root build.gradle
to use the JitPack repository and add the library dependency to your build. See our build.gradle
for the compiler arguments and dependencies used by the library.
Permissions
The library uses BLE to communicate with Combustion's thermometers so your app is required to declare Bluetooth permissions. The Android example walks through an approach for getting consent from your users as part of your app's UI. Also see the library's AndroidManifest.xml for the specific permission list.
Feature Requests & Issues
Your feedback is important. For requesting new features or reporting issues use the issue tracker.
Framework Features Coming Soon
The following features are planned for near-term development:
- Firmware update: Methods for updating a Probe's firmware with a signed firmware image.