信标的广告速率是否会影响探测器应用程序的电池

信标的广告速率是否会影响探测器应用程序的电池

本文介绍了信标的广告速率是否会影响探测器应用程序的电池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试测试Android和IOS信标检测器应用程序对不同信标协议和广告费率造成的电池消耗.我的问题是,无论如何,信标的广告发布率是否会影响探测器应用的电池消耗?这些应用程序会扫描固定的时间,并在固定的时间间隔后扫描,不同的广告费率会产生影响吗?

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?

谢谢

推荐答案

是的,在大多数情况下,检测到更多信标的应用会比检测到更少信标的应用消耗更多电量.对于iOS和Android以及Eddystone/AltBeacon/iBeacon都是如此,每种组合的详细信息各不相同.

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. 需要更多的CPU能力才能将每个信标数据包从字节数组解码为有用的字段,然后触发应用程序对其执行有用的操作.需要解码的数据包越多,使用的CPU(和电池电量)就越多.

  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.

如果在检测到信标时将应用程序在后台唤醒,则更频繁的唤醒将导致该应用程序在后台运行的频率更高,从而再次消耗更多的CPU和电池.

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.

在装有iBeacon的iOS 7+和Android 5+上(使用 Android Beacon库),当没有信标应用程序处于活动范围内时,蓝牙硬件过滤器用于减轻(1)的影响,而只是在后台监视检测.对于iOS上的Eddystone或AltBeacon格式,情况并非如此,因为它们通常无法有效使用硬件过滤器.当仅在后台查找检测结果时,这些格式可能会在iOS的后台使用更多的电池电量.

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.

好消息是,这种额外的电池消耗真正发挥作用的唯一时间是当您长时间不断地(扫描)许多信标时,并且大多数这种额外的电池消耗仅用于扫描.如果您的应用程序一次连续扫描几分钟或几小时,您会发现电池电量严重不足.如果这样做是用100个信标代替一个信标,您将看到更大的电池电量.

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.

这篇关于信标的广告速率是否会影响探测器应用程序的电池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 23:08