Not released for production - currently in ALPHA stage of development
The ODK Sensors framework simplifies the development of sensor-based mobile applications by creating a common abstraction that enables all sensors to be accessed through a unified sensing interface. This single interface exposes external sensors (e.g. USB, Bluetooth) as well as Android’s built-in sensors through a common interface. Connecting an external sensor requires a sensor driver that transforms the sensed data into a format that is easily usable by applications. The sensors framework handles threading and buffering, allowing sensor driver developers to focus on writing minimal pieces of sensor-specific code. By creating a sensor framework with separate sensor driver components we hope to enable an ecosystem of sharable and reusable sensor drivers.
Currently, the ODK Sensors Framework supports sensors over the USB and Bluetooth communication channels as well as Android's built-in sensors.
- Please read all the instructions and notes before beginning.
- You will need an Android 3.1 or higher device (like the Google Nexus 4) to install Sensors.
Downloading from Google Play
- From your device's application drawer, choose the Play Store.
- Search for "ODK" choose "ODK Sensors Framework" from "Open Data Kit".
- Select that result and click the Install button. Click OK after viewing the security settings.
Downloading from Web
- From your device's application drawer, choose Settings, then Applications. Make sure Unknown sources is checked.
- Return to the application drawer and choose Browser. Navigate to downloads/download-category/sensors-and-printers and download "ODK Sensors Framework vN.N...apk"
- In the download window, you will see "ODK Sensors Framework vN.N...apk". Select it to download the file. On older devices, the APK will automatically install after you approve the security settings. On newer devices, you must go to the download list, rename the file to restore the .apk extension (the extension will have been renamed to .man during the download process), then click on it to install it.
Using ODK Sensors
In order to use ODK Sensors with a physical sensor you will need to install the appropriate driver for that sensor. Please see the Zebra Printer driver for an example of a driver that allows applications to print text, barcodes and QR codes using a Bluetooth-enabled printer. The very first time your application accesses a physical sensor via ODK Sensors, the framework guides you through the process of discovering the sensor and associating it with a driver. Please see the Configuring the ODK Zebra Printer Driver section of the Zebra Printer driver for an example.
Please see the video below for an application that leverages ODK Sensors to safely pasteurize human breast milk. This application communicates with a Bluetooth-enabled temperature sensor to guide users through the pasteurization process. When pasteurization completes the application allows users to print a report and labels for pasteurized milk bottles.