By David G. Young
While most beacon apps focus on detection of bluetooth beacons, some of the coolest mobile apps you can make involve making the device transmit as a beacon as well. Think about an app that lets friends know they are nearby one another. When two users walk within about 50 meters of each other, presto! The app alerts you that a friend is nearby.
Apple has supported beacon transmission since iOS 6, and most Android devices have done the same starting with Android 5.0. But lots of folks are wary of transmitting all the time. The conventional wisdom is that app developers need to be careful about transmitting because of its impact on battery. We all know that angry users with drained batteries will quickly uninstall your app. Is transmitting as a beacon really that bad?
To test this hypothesis, I used the Locate app for iOS and Android, the first configured to transmit an iBeacon frame and the second configured to transmit an AltBeacon frame. I figured I could run the apps for a long time and see what the battery drain is compared to the same device over the same period of time without the transmitter app running.
Foreground vs. Background Transmission
It is important to note a major difference between iOS and Android when it comes to transmitting when your app is in the Background. On iOS, you essentially can’t do it. While BLE advertisements are allowed in the background, they are only allowed using a proprietary Apple format intended for advertising application services. You can’t send standard iBeacon transmissions unless your app is in the foreground. Android, on the other hand, has no such restrictions — you can transmit in the background all you want.
The fact that you aren’t allowed to transmit in the background on iOS leads many to believe the restriction is in order to save battery. Apple is notoriously stingy about restricting background usage of operations that are battery hungry.
Because of this restriction, the Apple tests had to be run when the app was in the foreground and the screen was on. Obviously, the screen causes a big battery drain itself. So it was important to run both the baseline test and the transmitter test under the same conditions with the same screen pattern on.
In order to test the battery usage of beacon transmitters on iOS and Android I installed the Locate app on an iPod Touch 5th Generation with iOS 8.1 and a Nexus 9 with Android 6.0. I chose non-phone variants of iOS and Android so I could eliminate the cell radio as a source of battery drain — something that is often outside developer control and subject to random variation. In addition, during the tests I put the devices into airplane mode (but with Bluetooth enabled) so that WiFi and GPS radios did not affect the results. Finally, I uninstalled everything but stock apps so I knew there weren’t any other apps draining the devices in the background.
Because iOS can only transmit in the foreground, I configured “AutoLock” to Never and set the screen brightness to a minimum. This kept the screen on and the app in the foreground. For both the baseline and transmitter tests, I kept the same Locate transmitter screen on the display. This is important because different screen patterns can affect battery usage when the display is on.
On Android, I simply hit the shoulder button to turn off the display for both the baseline and transmitter tests. Android also lets you configure the transmitter power level (which I set to low) and the number of advertisements per second (which I set to 1 Hz aka Low Frequency.)
You can see the results of the tests in the tables below:
Android Nexus 9 (6,700 mAh battery)
Baseline Transmitter On Transmitter On (extended)
Test Duration 12:45 hours 22:20 hours 52:36
Battery Start 100% 100% 100%
Battery End 100% 100% 94%
iOS iPod Touch 5th Gen (1030 mAH battery)
Baseline Transmitter On
Test Duration 04:16 hours 04:38 hours
Battery Start 100% 100%
Battery End 36% 43%
The first thing you notice is that the Nexus 9 really does not use much of its battery regardless of whether it is transmitting or not. And even with the beacon transmitter on, the battery was still at 100% after nearly 24 hours. After over two days of transmitting it was still at 94%. Clearly that beacon transmission is not using much battery. It’s so low, it is impossible to calculate how much it is using with any certainty with this test setup.
The iOS results show much higher battery usage 36% over the course of only four hours, but it is undoubtedly due to the screen being on. In fact, when both the screen and the beacon were on the battery usage was lower. There is no reason to think this is actually because the beacon transmission saves battery — it’s probably just that the beacon battery usage was within the margin of error of the test method. Because the screen is using so much battery, it’s hard to conclude that the beacon transmitter battery usage is negligible in this test setup. However, it is clearly negligible compared with the battery usage of the screen. And since iOS requires the screen to be on to transmit a beacon signal, there is no point in worrying about beacon battery usage at all.
These tests show conclusively that beacon transmission on iOS and Android causes an insignificant battery draw compared with other sources of battery drain. There is simply no reason to avoid beacon transmission in order to save battery.
Is this really so surprising? Consider that manufacturers of hardware beacons typically power a transmitter for months using a tiny CR2032 coin cell battery. These batteries have a capacity that is less than a tenth of the energy density of even the small battery in an iPod touch.
The fact that Apple restricts transmission in the background probably has more to do with other design concerns (like limitations on how many apps can transmit full advertisements simultaneously using a single bluetooth chip.) So if you have an app on an Android device that can transmit in the background, and you can get access to the transmitter before all the transmission slots run out, go for it! Your app users will never notice the difference in battery usage.