有没有办法在android中使用GPS_PROVIDER快速请求位置更新
我正在尝试获取位置更新,但需要 30 秒到 5 分钟之间的时间。所以我决定投入更快的粗略位置并在后台运行 GPS_PROVIDER。但没有运气。截至目前,执行粗略位置后,控件永远不会转到 GPS_PROVIDER 侦听器中的 onLocationChanged。有没有什么方法可以更快地获得更新,这样用户就不必等待很长时间?
I am trying to get the location updates but it takes anything between 30 seconds - 5 mins. So i decided to throw in coarse location which is faster and run the GPS_PROVIDER in background. But no luck. As of now after the coarse location is executed, the control never goes to onLocationChanged in GPS_PROVIDER listener. Is there some way to get the updates faster, so the user does not have to wai long?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 NETWORK_PROVIDER 来快速获取位置
You can use NETWORK_PROVIDER to get fast location
并且没有办法快速更新,因为它取决于硬件
NETWORK_PROVIDER 提供的速度相比而言更快,但是那里必须有活动网络。
and there is no way to to update fast as it depends on hardware
NETWORK_PROVIDER gives fast as compared to that , but you there must be active network in there .