Chapter 8. Android Programming

One of the main benefits of using a wireless standard like Bluetooth Low Energy is its support for a wide variety of smartphones and tablets. This opens up a new dimension of interaction to embedded hardware projects, which can now be designed with cheap hardware and rich interfaces.

Beyond the interface, you can also use the phone as a gateway to the larger Internet or in conjunction with other apps or APIs to create custom mashups with the embedded hardware you’ve created. This enables a whole new class of inexpensive devices that still offer rich functionality.

This chapter provides a basic overview of the hardware, software, and processes required to implement Bluetooth Low Energy on the Android operating system.

Getting Started

The example Android project developed in this chapter interfaces with the low-cost SensorTag device (SensorTag) manufactured by Texas Instruments (TI). The SensorTag offers many sensors and is a great example of a complex sensor device that can provide lots of information to be processed and visualized.

Because the GUI side of Android can get a bit complex and is generally beyond the scope of this book, this chapter focuses on getting you to the point where you can extract data out of the SensorTag and receive it via Bluetooth Low Energy. At that point, many other available resources can demonstrate ways to present data.

Get the Hardware

For hardware, you’ll need an Android device running Android version 4.3 or later. While ...

Get Getting Started with Bluetooth Low Energy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.