Android location fix inaccurate/old but Google Map

2019-05-20 22:06发布

问题:

This is a strange issue which mostly appears on Samsung devices but I cannot confirm its only on Samsung.

My app won't get or update to the correct location fix. It listens to GPS, network and cell providers but the location fix I get is still outdated and inaccurate sometimes the fix is like a day earlier.

I thought it might be a bug in my code but then I opened other apps (Yelp, etc...) and they also have the same problem.

I then open Google Maps and the location is perfectly accurate and up-to-date.

Is this an Android platform bug? Do Maps use a different internal location source provider? Has anyone dealt with this issue before and can provide a solution?

回答1:

I ran into the same issue. It is an Android platform bug and it seems that this is an open issue that Google knows about: https://code.google.com/p/android/issues/detail?id=57707

It is randomly happening. Google maps is working because their location is based on Google services (Fused Location) which you can also use. But they also have a bug with the january 2014 update: if you are outside and request a fastest location update rate (e.g. every second) and you are connected to the both network and gps receiver, you will receive a new location only at around 10 seconds even if gps is connected. They ruined my app which used to work fine with this update and still not fixed to this day!

So what you can do is wait for the fix or use google location service fused location if it fits for you!



回答2:

Go to settings>wifi>advanced and turn off ALWAYS ALLOW SCANNING