title: Send location updates to IntentService
body: <p>How can location updates be sent directly to Intent Service? The following approach does not work. OnConnected function is called but then the intent is never received in the service:</p>
  
  <pre><code>...
      private PendingIntent getLocationPendingIntent(boolean shouldCreate) {
          Intent broadcast = new Intent(m_context,LocationUpdateService.class);
          int flags = shouldCreate ? 0 : PendingIntent.FLAG_NO_CREATE;
          return PendingIntent.getService(m_context, 0, broadcast, flags);
      }
  
  
  
      @Override
      public void onConnected(Bundle arg0) {
          PendingIntent locationPendingIntent = getLocationPendingIntent(true);        
          LocationRequest locationRequest = new LocationRequest();
          locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
          locationRequest.setInterval(LOCATION_UPDATE_INTERVAL);
          locationRequest.setFastestInterval(LOCATION_FASTEST_UPDATE_INTERVAL);
          LocationServices.FusedLocationApi.requestLocationUpdates(m_googleApiClient, locationRequest,locationPendingIntent);
  }
  ...
  </code></pre>
  
  <p>Intent Service:</p>
  
  <pre><code>import android.app.IntentService;
  import android.content.Intent;
  import android.util.Log;
  
  public class LocationUpdateService extends IntentService {
  
      public LocationUpdateService() {
          super(LocationUpdateService.class.getName());
      }
  
  
      @Override
      public int onStartCommand(Intent intent, int flags, int startID) {
          super.onStartCommand(intent, flags, startID);
          Log.d("LocationUpdateService","Location received");
          return START_REDELIVER_INTENT;
      }
  
      @Override
      protected void onHandleIntent(Intent intent) {
          Log.d("LocationUpdateService","Intent received");
  
      }   
  }
  </code></pre>
  
  <p>Manifest file:</p>
  
  <pre><code>...
  &lt;service  android:name=".LocationUpdateService" /&gt;
  ...
  </code></pre>