I want to preface this by saying that I'm in China where Google location services sometimes have issues.
I'm using the LocationClient
to get user's current location.
protected void onCreate(Bundle savedInstanceState) {
...
mLocationClient = new LocationClient(this, this, this);
...
}
Very straightforward. Then in my onConnected
callback, I get the location.
public void onConnected(Bundle connectionHint) {
Location location = mLocationClient.getLastLocation();
...
}
The location I get back is always the same, but it is about ~500m away from my actual location. GPS is enabled, although the icon indicating it is being used does not come on. I am also on WiFi and have 3G.
When I open the actual Google Maps app, my location is perfectly accurate (unlike the location I get in my own app). I also see the icon indicating GPS is being used.
Questions
Thanks!
China has a special dealing with GPS data, because the government force the related map producing company to add some bias. I'm stuck with it for a period of time.