Big changes in Android iBeacon Support announced

Some fairly significant improvements to were announced at Google I/O yesterday (25th June) for improved BLE support in Android L aka Lollipop.

Background beacon scanning

In current versions of Android, scanning for beacons/iBeacons/BLE advertising packets will not work when the device is in standby mode.  This limitation effectively nullifies Android support for most practical iBeacon solutions.  In Lollipop this major iBeacon road block has been removed as Android devices will continue background scanning for iBeacons even when the device is in standby mode.

Battery Life Improvements

In the same announcement, Google also announced functionality for developers to choose between low latency (fast beacon detection) and low power (longer battery life).  This is even more relevant when considered alongside another Google announcements for identifying power consumption on a per-app basis.  Developers beware, if your app is power hungry you might want to put it on a crash diet before your users notice.

Peripheral Mode

Android devices can now act as multiple iBeacons/Beacons with all the benefits of both background operations and the battery life improvements.

How the changes work

Central Mode
When operating in central mode a device scans for advertising packets from BLE peripherals and may form connections to exchange additional data.  Scanning (e.g. for nearby beacons) prevents a device from going into standby which kills battery life.  Scanning has now been altered so device can go into standby when not detecting nearby devices.  When nearby devices are advertising, filters can be defined so your application only processes relevant packets e.g. by Service UUID, Service Data, Manufacturer data.  Your app only wakes up from background when a packet matches your filters.  You only get notified when Android identifies a device you’re interested in.
Scanning continues in the background until stopped manually and is optimised and balanced with other activities.  Developers can nudge their apps between fast beacon recognition time and low power consumption.
Low latency <- Balanced -> Low Power
Low latency mode increases frequency of scanning which increases speed of detection but consumes more power.  Low power modes decrease scanning frequency which may delay detection but also decreases power consumption.

Peripheral Mode

An Android device can now act as a BLE peripheral broadcasting advertising packets and forming data connections with local devices acting in central mode.  Apps can specify the content of the broadcast packet such as; Service UUID, Service Data and manufacturer data.
Android now allows multiple apple to advertise concurrently with each App having its own packet.  Advertising rates and power consumption can be controlled just like in central mode choosing between low latency or low power.
Peripheral mode could be very significant for anyone running an iBeacon program, allowing a single Android device to act as multiple iBeacons opens up a huge number of interesting possibilities.

It’s looking like Android iBeacon support is set for a fairly big boost.


About Author

Leave A Reply