简体   繁体   English

反正有使用Android中的GPS_PROVIDER快速请求LocationUpdates

[英]Is there anyway to requestLocationUpdates fast using GPS_PROVIDER in android

I am trying to get the location updates but it takes anything between 30 seconds - 5 mins. 我正在尝试获取位置更新,但需要30秒-5分钟之间的任何时间。 So i decided to throw in coarse location which is faster and run the GPS_PROVIDER in background. 因此,我决定扔进较快的粗略位置,并在后台运行GPS_PROVIDER。 But no luck. 但是没有运气。 As of now after the coarse location is executed, the control never goes to onLocationChanged in GPS_PROVIDER listener. 到目前为止,执行粗略位置后,该控件永远不会转到GPS_PROVIDER侦听器中的onLocationChanged。 Is there some way to get the updates faster, so the user does not have to wai long? 有什么方法可以更快地获取更新,因此用户不必费时间吗?

您可以使用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 . 与NETWORK_PROVIDER相比,它提供的速度更快,但是您必须在其中有活动的网络。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM