Android 请求位置更新和获取 GPS 修复所需的时间
我正在使用 LocationManager 的 requestLocationUpdates 方法来获取 GPS 位置更新。我使用 60000 的 minTime 参数来指示我希望每分钟更新一次位置 - 我不关心 minDistance(我使用值 0 作为 minDistance)。
如果我能正确理解android文档,我的LocationListener将每分钟执行一次以接收当前位置。这就是模拟器发生的情况。
然而,我无法理解两次执行之间会发生什么:GPS每次都会关闭吗?如果 GPS 关闭,获得 GPS 定位所需的时间会怎样(该时间可能超过一分钟)?我会每 1 分钟+(获取 GPS 定位所需的时间)获取更新吗?
不幸的是,模拟器无法帮助我解决这些问题,而且我现在手上没有 Android 设备,所以如果有人有这方面的经验,请帮助我!
提前致谢!
I am using the requestLocationUpdates method of LocationManager to get GPS location updates. I am using a minTime parameter of 60000 to indicate that I'd like a location update every minute - I don't care about minDistance (I use a value of 0 as minDistance).
If I can understand correctly the android documentation, my LocationListener will be executed every minute to receive the current location. This is what happens with the emulator.
However, I couldn't understand what would happen between executions: Will the GPS be turned off every time ? And If the GPS is turned off, what will happen with the time needed to get a GPS fix (that time could be more than one minute) ? Will I get updates every 1 minute + (time neede to get the GPS fix) ?
Unfortunately the emulator cannot help me with these problems and I do not have an Android device in my hands right now, so If anybody has experience with this stuff help me !
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它没有被指定,因为这是特定于实现的。
It is not specified, because that is implementation-specific.
最新的 GPS 芯片组通常可以在一分钟内(通常不到 20 秒)获得锁定,所以应该没问题。
The latest GPS chipsets can usually get a lock in well under a minute, often less than 20 seconds, so you should be fine.