getLastKnownLocation out-of-date even after other apps find my location!
In my app, I request location updates and use a LocationListener and the majority of the time everything works well. When the app starts, it uses getLastKnownLocation while waiting for the first location update.
I have been doing some tests on getLastKnownLocation and the results are strange...
If the result of getLastKnownLocation is ou开发者_运维百科t-of-date, then I exit the app and run Google Maps and wait for it to pick up my location, then when I re-run my app getLastKnownLocation still returns the old location. I don't understand why this is happening. Surely, if GMaps can get a fix then getLastKnownLocation should be up-to-date, right?
精彩评论