The following is how I am initializing the LocationDisplay
Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE); AndroidLocationDataSource androidLocationDataSource = new AndroidLocationDataSource(mContext, criteria, 250L, 1L); mLocationDisplay.setLocationDataSource(androidLocationDataSource); mLocationDisplay.setWanderExtentFactor(0);
You'd think this would mean it updates up to four times a second, but it doesn't.
Especially after resuming the activity, it updates whenever it feels like it.
Sometimes that's two seconds, sometimes five seconds, sometimes 15 seconds.
Here is an illustration.
A service running in the background IS getting the location every second through locationManager.
The arrow just isn't keeping up.
It will catch up to the track once in a while.
How do I make the LocationDisplay behave decently?
I could create my own LocationDataSource - maybe.
But it would be a major pain because you don't allow subclassing and your code is very obscure.
And how do I know the bottleneck isn't somewhere else besides the LocationDataSource?