title: Android - Google Maps - Camera Update every location change
body: <p>I'm building an app, which has to keep the user in the center of the map all the time.</p>
  
  <p>I have set up the following:</p>
  
  <pre><code>locationManager = (LocationManager) saveContext
          .getSystemService(Context.LOCATION_SERVICE);
  LocationListener locationListener = new MapLocationListener();
  locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000,
          10, locationListener);
  if (myLocation != null) {
      setLocation(myLocation);
  }
  
  private void setLocation(Location location) {
      workoutMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(
              location.getLatitude(), location.getLongitude()), 18.0f));
  }
  </code></pre>
  
  <p>This works, as  long I have a lastKnownLocation in my phone's history. The map will center correctly.</p>
  
  <p>I wish that every time I'm getting a new location update, setLocation() will be executed again, with the new location info.</p>
  
  <p>I've tried creating a thread which just does get the lastKnownLocation and then setLocation();
  But this isn't working out.</p>