Does the Advertisement Rate of a beacon affect battery of a detector application

别说谁变了你拦得住时间么 提交于 2020-01-06 15:59:53

问题


I was trying to test battery consumption caused by Android and IOS beacon detector application for different beacon protocols and advertisement rates. My question is that will the advertisement rate of beacons in anyway affect the battery consumption of detector applications? These applications scan for a fixed amount of time and after a fixed interval, will different advertisement rates have any effect?

Thanks


回答1:


Yes, in most cases an app that detects more beacons will use somewhat more battery than one that detects fewer beacons. While this is true on both iOS and Android and for Eddystone/AltBeacon/iBeacon, the details vary for each combinations.

Two reasons for detecting more beacons using more battery on the receiver side:

  1. It takes more CPU power to decode each beacon packet from an array of bytes into useful fields and then trigger the app to do something useful with it. The more packets that need to be decoded, the more CPU (and battery power) that is used.

  2. If an app is woken up in the background when it detects beacons, more frequent wake ups will cause the app to run in the background more often, again burning more CPU and battery.

On both iOS 7+ with iBeacon and Android 5+ (with the Android Beacon Library), bluetooth hardware filters are used to mitigate the effects of (1) when no beacon apps are actively ranging, but instead just monitoring for detections in the background. This is not true with Eddystone or AltBeacon formats on iOS, because they generally cannot use the hardware filters effectively. These formats may use a bit more battery power in the background on iOS when simply looking for detections in the background.

The good news is that the only time this extra battery usage really comes into play is when you are constantly ranging (scanning) many beacons for long periods of time, and most of this extra battery usage is for just doing the scanning at all. If your app is constantly scanning for many minutes or hours at a time you will see a significant battery hit. And if it does so with 100 beacons around instead of one, you will see an even bigger battery hit still.



来源:https://stackoverflow.com/questions/38836830/does-the-advertisement-rate-of-a-beacon-affect-battery-of-a-detector-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!