调用CLLocationManager stopUpdatingLocation之后,内部GPS天线是否立即停止工作? [英] Does the internal GPS antenas stop working immediately after calling CLLocationManager stopUpdatingLocation

查看:114
本文介绍了调用CLLocationManager stopUpdatingLocation之后,内部GPS天线是否立即停止工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的情况。
在我的应用程序中,不需要连续监视用户位置,但是我需要位置尽可能准确。因此,我只是调用了CLLocationManager startUpdatingLocation,并将kCLLocationAccuracyBestForNavigation设置为desiresAccuracy,并在获得具有所需精度的位置后(通过将newLocation.horizo​​ntalAccuracy与预定义值进行比较),我想停止位置更新并在几秒钟后再次撤消更新。但是,当我调用stopUpdatingLocation时,状态栏上的位置图标会在大约10秒钟后消失,这是否意味着苹果已经考虑了这种情况,当用户调用stopUpdatingLocation时,它在一段时间内没有关闭天线,可能是因为将它们回退了从能量上讲,它的价格有些昂贵,因此它们只需要等待一段时间,然后才能关闭天线。或者可能只是位置图标没有消失,但天线已关闭。那么有人可以解释当有人调用stopUpdatingLocation时到底发生了什么?

Here is my scenario. In my app there is no need of continuously monitoring user location, but I need the location to be as accurate as possible. So I just call CLLocationManager startUpdatingLocation with kCLLocationAccuracyBestForNavigation set as desiredAccuracy, and after I get the location with my desired accuracy (by comparing newLocation.horizontalAccuracy with predefined value) I want to stop the location update and revoke update again after several seconds. But when I call stopUpdatingLocation the location icon from status bar disappears after about 10 seconds, does this mean that apple has considered this scenario, when user calls stopUpdatingLocation it doesn't shut down antenas for some period of time, may be because turning them back on is somewhat expensive in terms of energy, so they just wait some time and only after that shut down antenas. Or may be simply the location icon is not disappeared but the antenas are turned off. So can someone explain what happens exactly when someone calls stopUpdatingLocation?

推荐答案

GPS无线电在上一次使用后10秒钟会掉电。在WWDC的性能优化会议之一中对此进行了讨论。

The GPS radios power down 10 seconds after last use. That was discussed in one of the performance optimization sessions at WWDC.

这篇关于调用CLLocationManager stopUpdatingLocation之后,内部GPS天线是否立即停止工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆