title: Using GoogleApiClient + LocationServices not updating
body: <p>I'm just trying to do a simple 'tutorial' app to get my phone's location (to learn how to use it later in some other app) but I'm just not getting anywhere.</p>
  
  <h3>What I've done</h3>
  
  <ol>
  <li><p><strong>Android Developer's tutorial :</strong> First of, I followed the tutorial in the Android's developer site (developer.android.com/training/location/receive-location-updates.html). </p>
  
  <p>Just like indicated in there, I used a Location, LocationClient and LocationRequest, initializing them (and setting them up) in onCreate. LocationClient is connected and disconnected in onStart and onStop.</p>
  
  <p>I'm requesting location update after I'm connected (in onConnected). I verify that    GooglePlayServices are available before making this call and I'm still not getting any update in "onLocationChanged".</p></li>
  <li><p><strong>GoogleApiClient :</strong> I noticed that LocationClient is deprecated and LocationServices are preferred (developer.android.com/reference/com/google/android/gms/location/LocationClient.html).</p>
  
  <p>As indicated here : <a href="https://developer.android.com/reference/com/google/android/gms/location/FusedLocationProviderApi.html" rel="nofollow noreferrer">https://developer.android.com/reference/com/google/android/gms/location/FusedLocationProviderApi.html</a>, I use a GoogleApiClient and set it to LocationServices (also <a href="https://stackoverflow.com/a/25013850/3802589">https://stackoverflow.com/a/25013850/3802589</a>). So then I set it all to use this but still I'm not getting any updates on the location. </p></li>
  </ol>
  
  <p>onLocationChanged it should print if there's a response. I also put a button that prints location or 'nothing'.</p>
  
  <h3>Remarks</h3>
  
  <p>I checked using Google Maps to see if maybe I had something off but it's working just fine.</p>
  
  <h3>Project</h3>
  
  <p>build.gradle</p>
  
  <pre><code>dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.google.android.gms:play-services:5.0.77'
      compile "com.android.support:support-v4:20.0.+"
  }
  </code></pre>
  
  <p>Manifest</p>
  
  <pre><code>...
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt;
  ...
  &lt;meta-data android:name="com.google.android.gms.version"
              android:value="@integer/google_play_services_version" /&gt;
  ...
  </code></pre>
  
  <p>Code</p>
  
  <pre><code>public class MyActivity extends Activity  implements
          GoogleApiClient.ConnectionCallbacks,
          GoogleApiClient.OnConnectionFailedListener,
          LocationListener {
  
      private GoogleApiClient mLocationClient;
      private Location mCurrentLocation;
      LocationRequest mLocationRequest;
  
      ...
      /* Constant fields - request interval */
      ...
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_my);
  
          mLocationClient = new GoogleApiClient.Builder(getApplicationContext())
                                  .addApi(LocationServices.API)
                                  .addConnectionCallbacks(this)
                                  .addOnConnectionFailedListener(this)
                                   .build();
  
          mLocationRequest = new LocationRequest();
          mLocationRequest.setInterval(UPDATE_INTERVAL);
          mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
  
          mLocationRequest.setFastestInterval(FASTEST_INTERVAL);
  
      }
  
      @Override
      protected void onStart() {
          super.onStart();
          mLocationClient.connect();
      }
  
      @Override
      protected void onStop() {
          super.onStop();
  
          LocationServices.FusedLocationApi.removeLocationUpdates(mLocationClient, this);
  
          mLocationClient.disconnect();
      }
  
      public void onClick(View view) {
  
          if (mCurrentLocation != null) {
              Log.i("Location", mCurrentLocation.toString());
          } else {
              Log.i("Location", "nothing");
          }
  
      }
  
      @Override
      public void onLocationChanged(Location location) {
          Log.d("Location Update", "CHANGED");
          mCurrentLocation = location;
      }
  
      @Override
      public void onConnected(Bundle bundle) {
          // Display the connection status
          Toast.makeText(this, "Connected", Toast.LENGTH_SHORT).show();
          if(servicesConnected()) {
              LocationServices.FusedLocationApi.requestLocationUpdates(mLocationClient, mLocationRequest, this);
          }
      }
  
      @Override
      public void onConnectionSuspended(int i) {
          Toast.makeText(this, "Disconnected. Please re-connect.",
                  Toast.LENGTH_SHORT).show();
      }
  </code></pre>
  
  <p>logcat</p>
  
  <pre><code>8948-8948/example.android.com.test D/Location Updates﹕ Google Play services is available.
  8948-8948/example.android.com.test I/Location﹕ nothing
  </code></pre>
  
  <p>I feel that I might be forgetting something really simple... but I just can't see it and I've spent too much time trying to get just a simple location...</p>
  
  <p>I could maybe just use the android.location API but... It bothers me that this is so hard (supposedly being easier).</p>