title: How does it work - requestLocationUpdates() + LocationRequest/Listener
body: <p>I am new Android coder and I have problem with requesting updates for my localization.</p>
  
  <p>I working with tutorials from <a href="http://developer.android.com/training/location/receive-location-updates.html">http://developer.android.com/training/location/receive-location-updates.html</a> .</p>
  
  <p>My application can handle exceptions, getting latitude and longitute properly, and geocoder can handle displaying the adress. But I ask for location only once - or when location changes. I would like to do time intervals. For now I started implementing code from the tutorials and it looks like that:</p>
  
  <pre><code>public class MainActivity extends Activity implements 
  GooglePlayServicesClient.ConnectionCallbacks,
  GooglePlayServicesClient.OnConnectionFailedListener,
  LocationListener {
  
  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;
  
  private TextView tvStatus;
  private TextView tvLatitude;
  private TextView tvLongitude;
  
  LocationRequest mLocationRequest;
  LocationClient mLocationClient;
  Location mCurrentLocation;
  
  boolean bNetworkEnabled;
  boolean bGPSEnabled;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.activity_main);
      tvStatus = (TextView)findViewById(R.id.tvStatus);
      tvLatitude = (TextView)findViewById(R.id.tvLatitude);
      tvLongitude = (TextView)findViewById(R.id.tvLongitude);
  
      mLocationRequest = LocationRequest.create();
      mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
      mLocationRequest.setInterval(UPDATE_INTERVAL);
      mLocationRequest.setFastestInterval(FASTEST_INTERVAL);
      mLocationClient = new LocationClient(this, this, this);
  
      checkProviders();
  }
  </code></pre>
  
  <p>So there are already intervals implemented and location request. But in the link I gave before there is a comment that I should use somewhere <code>requestLocationUpdates()</code> (probably <code>onCreate()</code>, <code>onStart()</code> and removal of request on <code>onStop()</code>), but I have problem with it. So, Eclipse shows me 3 methods:</p>
  
  <pre><code>requestLocationUpdates(LocationRequest request, LocationListener listener)
  requestLocationUpdates(LocationRequest request, PendingIntent CallbackIntent)
  requestLocationUpdates(LocationRequest request, LocationListener listener, Looper looper)
  </code></pre>
  
  <p>So the first one I think is most right in this place. What should I place in <code>LocationListener</code> slot? I ask for help with little explanation how it works.</p>