title: Android app not receiving location updates
body: <p>I'm trying to run an app that updates and centers the location from the device on the map fragment displayed on screen. 
  The blue dot on the map is displayed on the correct position, and the gps location is locked, but it seems that the onLocationChanged function is never called.</p>
  
  <p>EDIT: Things are getting even weirder now. I left the app running for a while (around 10 minutes) and it did updated it's location a couple of times at random. and it suddenly stopped again. At least i know the functions are correct. But now where should i look?</p>
  
  <p>Below is the relevant code.</p>
  
  <pre><code>public class MapaActivity extends FragmentActivity implements LocationListener{
  
  public static GoogleMap mMap;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
  
      setUpMapIfNeeded();
  
      mMap.setMyLocationEnabled(true);
  
  
  }
  
  public boolean setUpMapIfNeeded() {
  
      if (mMap == null) {
  
          mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
  
          if (mMap == null) {
  
              setUpMap();
  
          }
      }
      return true;
  }
  
  private void setUpMap() {
  
      mMap.setMyLocationEnabled(true);
  
      LocationManager locationManager;
  
      locationManager = (LocationManager)getSystemService(LOCATION_SERVICE);
  
      Criteria criteria = new Criteria();
  
      String provider = locationManager.getBestProvider(criteria, true);
  
      Location location = locationManager.getLastKnownLocation(provider);
  
      locationManager.requestLocationUpdates(provider, 1000, 0  , this);
  
  }
  
  
  
  @Override
  public void onLocationChanged(Location location) {
  
      //do some stuff
  
  }
  </code></pre>