1

getLastKnownLocation returning null Android

view story
linux-howto

http://stackoverflow.com – I know this has been talked about many time but nothing has helped me fix the problem that getLastKnownLocation is returning null. My Activity implement LocationListener: public class MainActivity extends Activity implements GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener, LocationListener { I have this in my onCreate method: LocationManager lm = (LocationManager) getSystemService(LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this); And i then try to get the user location like so (also in on (HowTos)