iPhone 显着位置变化会导致电池耗尽吗?
问题:重要位置变更后台服务是否容易耗尽电池电量?当位置发生重大变化时,我试图跟踪经度纬度读数。然而,在开始之前,我只想确保这不会耗尽电池。
如果上述位置服务不会耗尽电池,有人可以推荐一种存储位置更改的方法,以节省电池电量。我最初的想法是将经纬度点存储在 iPhone 本地,然后以较低的频率(2 小时)将信息发送到服务器。有人有更好的方法吗?
我正在尝试构建一个简单且省电的位置跟踪应用程序。谢谢大家。
Question: Does the Significant Location Change background service drain battery easily? I'm trying to track longitude latitude readings when the there is a Significant Location Change. However, before starting, I just want to make sure that this doesn't drain the battery.
If the Location service described above does not drain battery, can someone recommend a way to store the location changes that would be battery efficient. My initial thought was to store the longitude latitude points locally on iPhone and then send the information to the server on a much less frequent basis (2 hours). Anyone have a better approach?
I'm trying to build a simple location tracking app that is battery efficient. Thanks all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
显着的位置变化不会消耗任何额外的电池电量,因为设备使用 GSM 系统正在使用的信息。无论如何,它必须始终跟踪多个蜂窝塔的信号强度读数。仅当满足某些条件时,您的应用程序才会启动/唤醒。
为了节省电池,您必须注意两个子系统:
2 小时可能太多了,因为用户可能会终止应用程序,然后永远不会进行更新。或者,如果您实现离线队列,它们只会在下次启动应用程序时发送。但这取决于您的具体场景。
Significant location changes do not take any extra battery draining because the device uses information that the GSM system is working with anyway. It has to keep track of signal strength readings of multiple cell towers all the time anyway. Your app is only started/woken when certain criteria are met.
To conserve battery you have to watch two subsystems:
2 hrs might be too much because the user might be terminating the app and then the updates would never be made. Or if you implement an offline queue, they would only be sent next time the app is started. But that depends on your specific scenario.
它应该是蜂窝塔三角测量,而不是 GPS 定位,这足以满足您的需求。它根本不应该很重。
与上传位置相同,很少这样做就可以了。
编辑:将核心位置与重要位置混淆。
It should be cellular tower triangulation, and not GPS location, which is more than enough for your needs. It shouldn't be battery heavy at all.
Same with uploading the location, do it rarely and you are fine.
Edit: Confused Core Location with Significant Location.