Q:

requestLocationUpdate doesn't update

I've setup this LocationRequest
private static final int MILLISECONDS_PER_SECOND = 1000;

public static final int UPDATE_INTERVAL_IN_SECONDS = 5;

private static final long UPDATE_INTERVAL = MILLISECONDS_PER_SECOND * UPDATE_INTERVAL_IN_SECONDS;

private static final int FASTEST_INTERVAL_IN_SECONDS = 1;

private static final long FASTEST_INTERVAL = MILLISECONDS_PER_SECOND * FASTEST_INTERVAL_IN_SECONDS;

mLocationClient = new LocationClient(this, this, this);
mLocationRequestHigh = LocationRequest.create();

mLocationRequestHigh.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);

mLocationRequestHigh.setInterval(UPDATE_INTERVAL);

mLocationRequestHigh.setFastestInterval(FASTEST_INTERVAL);

That's setup in my BaseActivity, and then in another activity I call
mLocationClient.requestLocationUpdates(mLocationRequestHigh, this);

However, that just searches for location, but it doesn't ever seem to get a location. Have I missed/done something wrong or could that just be down to my location? If I load up google maps it gets my location within a few seconds.

A:

Google maps use not only GPS, but your network location. Also there are methods like getLastKnownLocation() to get fast cahced fix. LocationRequest.PRIORITY_HIGH_ACCURACY means you will use only GPS and thus waiting for GPS fix. Use "Fake GPS Location" app from Google Play store to make sure whether the GPS works in your app. If it does with "Fake GPS" than it's just connecting to sattelite problem.
You can get more details at
http://developer.android.com/guide/topics/location/strategies.html
Generally, if you want your app to Perform like Google Maps you must follow all tips from the article above. The source code of Google Maps is not available for public, so you can't just copy-paste their code.

