What Android support for Bluetooth Low Energy means for developers

By -

Expectations were high in the run up to Google’s recent developer conference with rumors of new devices and a new version of Android. Although Google didn’t announce any new hardware or software, it did announce that the next version of Android will support Bluetooth Smart (or Bluetooth Low Energy as it is sometimes known).

To be precise Google said it would support Bluetooth Smart in Android API version 18. The current version of Android is 4.2 codenamed Jelly Bean. It supports Android API version 17. Logically Android API version 18 will be in the next release of Android, however it is unknown if API version 18 will be part of Android 4.3 or Android 5.0.

BrwjcbzYWfVYwzq-556x313-noPadBluetooth has been around for a long time and predates Android and the current smartphone era. However the original Bluetooth specifications were as much a drain on battery of the phones as they were on the Bluetooth devices. The new Bluetooth specification defines three Bluetooth categories. First there is the existing Bluetooth protocol which has now been renamed to Bluetooth Classic. In addition to this there is Bluetooth Smart Ready which includes a new protocol with a significantly reduced power consumption. Bluetooth Smart Ready devices are compatible with Bluetooth Classic and Bluetooth Low Energy (BLE). Somewhat confusingly there is another category called Bluetooth Smart (without the Ready). These devices only understand Bluetooth Low Energy and can’t use Bluetooth Classic.

Although the first versions of BLE appeared in 2006 when Nokia released a low energy version of Bluetooth dubbed Wibree support from other smartphone manufacturers has been relatively slow in coming. In 2010 Nokia’s low energy version was officially folded into the Bluetooth standard. It has been supported by Apple since 2011 when the company released the iPhone 4S, however Android support has been missing until Google’s recent announcement.

This is not to say that there were no Android devices that supported Bluetooth Smart. In fact around the time Apple released the iPhone 4S, Motorola released the Droid RAZR with BLE support. Samsung’s popular Galaxy S3 and its new Galaxy S4 both also support BLE. The problem was that without official Android support each Android manufacturer needed to provide an independent (and incompatible) SDK.

This will all change with the next version of Android and now app developers can start to create standard apps which interact with the increasingly popular low energy bluetooth accessories. According to the Bluetooth Special Interest Group (Bluetooth SIG) some 250 million Bluetooth Smart “appcessories” will be shipped during 2013 and nearly a billion are expected to ship in 2016.

Appcessories are gadgets that connect to apps on smartphones and tablets via Bluetooth Low Energy. Due to the energy saving technology built into the specification, Bluetooth Smart devices can be considered as “always on” and yet measure their battery lives in months or even years.

The current market includes a bewildering range of devices including proximity sensors, heart rate monitors, blood pressure monitors, treadmills, weight scales, devices with GPS tracking, and glucose monitors. There are even dimmer lamps and toy helicopters with BLE support! Among the most popular devices at the moment are a smartwatch from Pebble and a range of personal fitness trackers from Fitbit.

What is interesting to developers is the as-yet untapped potential for apps and appcessories. The Bluetooth 4.0 specification, which includes the relevant parts for BLE, defines a set of profiles which classify the possible actions of appcessories. One example profile is the ability for a button to be pressed on one device and an alarm bell to sound on another. This Find Me Profile allows an electronic leash to be attached to devices. You could start a finder type app on your phone and have an alarm sound on your wallet, keys or smartwatch!

The Proximity Profile allows one device to detect whether it is within close physical range of another device. Once within range an alarm could be sounded. Possible applications include parking sensors which warn your phone when you are too close to another vehicle.

The Phone Alert Status profile allows a device like a wristwatch to receive notifications from another device, such as a phone. These alerts can be used to tell the wearer that something important is happening, like an incoming call.

Android API version 18 includes new BLE system calls which specifically target Bluetooth Smart devices. The best practices for BLE are different to those for Bluetooth Classic. For the later two devices would be paired and typically data would be constantly sent between the two. With BLE the idea is that devices quickly scan, connect, query and then disconnect. This allows both devices to conserve power and only send and receive data when needed.

Since BLE is designed to save battery life, app developers need to be aware that it isn’t designed to replace Bluetooth Classic for streaming audio and video. The data rates on BLE are intentionally lower to save power.

For more information on Android’s upcoming Bluetooth Smart support checkout the presentation from Google’s developer conference:  https://developers.google.com/events/io/sessions/326240948 as well as Google’s Bluetooth developer guide: http://developer.android.com/guide/topics/connectivity/bluetooth.html

 Byline:

Gary Sims is a mobile app developer, technical writer and author of MobileAdvertisingComparison.com

Hi! I am a full time tech savvy blogger, author and founder of TechMafia.org, You also can follow me on Facebook.

Leave a Reply

Your email address will not be published. Required fields are marked *