Friday 15 May 2015

java - Why Android LocationManager has long delay before location updates start if setting accuracy -


If I set any accuracy for the criteria, then Locationman takes a lot of time to update the location: / P>

  Criteria = new criteria (); Criteria.setAccuracy (Criteria.ACCURACY_FINE); Provider = locationManager.getBestProvider (criteria, true); LocationManager.requestLocationUpdates (provider, 0, 0, this);   

If I remove the Accuracy flag, it starts immediately, but is sometimes not accurate.

How can I start updating it with quick and accurate accuracy?

Unfortunately, no way.

If you use ACCURACY_FINE , then you only use GPS, but GPS has "cold start" effect, this means that if you have long GPS device If you do not use it, then it takes a lot of time to connect to satellites and download almanac and apharmers. You can not change this behavior

If you do not use ACCURACY_FINE , then you will use both GPS and network (mobile, Wi-Fi) signals. You will get instant first place from the network because they do not have "cold start" effect, but this method is less accurate. When your GPS module is ready, you will also receive updates of it.

No comments:

Post a Comment