使用定位服务时 iPhone 电池耗尽

发布于 2024-10-07 14:43:32 字数 203 浏览 2 评论 0原文

很高兴知道 iOS 标准位置服务在不断更新位置时不同精度设置的电池消耗率是多少(我不是在谈论重大变化的服务)。我尝试过使用 Instruments 的能源使用工具,但我似乎无法捕获任何信息。与此同时,我需要花很长时间坐在那里给我的 iPhone 计时,看看它需要多长时间才能耗尽。

我知道精度越低,电池消耗就越少。但这方面的可靠数字是多少?有谁知道吗?

谢谢!

It would be great to know what the battery drain rate is for different accuracy settings for the iOS standard location service while it is updating location constantly (I'm not talking about the significant changes service). I've tried using Instruments' Energy Usage tool but I can't seem to capture any info. At the same time, it is gonna take too long to sit there and time my iPhone to see how long it takes to die.

I know that the lesser the accuracy, the lesser the battery drain. But what are the solid numbers on this? Does anyone know?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

£烟消云散 2024-10-14 14:43:32
  1. 我不知道任何官方数字 - 没有任何官方数字很有意义,因为它实际上取决于您对设备的使用(WiFi/3g)以及位置使用参数(距离- 过滤器、可接受的位置时间戳、轮询间隔等)

  2. 但是,UIDevice 正是您进行自己的测量所需的:
    [[UIDevice currentDevice] setBatteryMonitoringEnabled:YES];

[[UIDevice currentDevice] 电池电量];
[[UIDevice currentDevice] 电池状态];

计算您自己的统计数据,只需记住使用该位置的其他应用程序也可能会影响设备的电池寿命(例如:如果您的应用程序收到缓存的位置并接受它,它会阻止设备使用其天线来获取更新的位置... )

  1. I don't know any official numbers - it pretty much makes sense there aren't any, since it really depends on the use you are making of your device (WiFi/3g), and the location-use parameters (distance-filters, acceptable location timestamps, polling intervals etc)

  2. BUT, UIDevice has exactly what you need to make your own measurements:
    [[UIDevice currentDevice] setBatteryMonitoringEnabled:YES];

[[UIDevice currentDevice] batteryLevel];
[[UIDevice currentDevice] batteryState];

calculate your own statistics, just remember that other applications using the location may also affect the device battery life (for example: if your App received a cached location and accepted it, it prevented the device from using it's antennas to get newer locations...)

蓝戈者 2024-10-14 14:43:32

正如麦坎农所说,这与位置服务的准确性有关。一般来说,你的准确度越高,消耗的电池就越多。不过,我没有关于差异的任何具体数字。

我认为这与手机找到卫星和无线电桅杆的速度有关。定位越准确,需要更长的时间来通过监听更多的卫星来确定位置。

Like MCannon said, it is to do with the accuracy of the location services. In general the more accurate you are the more battery is used. I don;t have any concrete numbers on the differences though.

I presume it is to do with how quickly the phone can find the satellites and radio masts. The more accurate positioning requires longer to fix a position by listening to more satellites.

请别遗忘我 2024-10-14 14:43:32

您可以编写一个连续运行的测试应用程序,直到电池耗尽。每分钟或以任何能满足您需求的频率写入一条日志语句。当手机死机时,查看日志。当手机没电时你就会看到。

You can write a test app that runs continuously until the battery dies. Write a log statement every minute, or for whatever frequency will meet your needs. When the phone dies, look at the log. You'll see when the phone died.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文