title: Android Google API Client is not Connecting
body: <p>Hey guys I have the Problem that when I created a new instance of the Google Api Client, and I called the method '.connect', I get a Exception which says that the GoogleApiClient is not connected yet.</p>
  
  <p>MainActivity.java</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      this.googleApiClient = new GoogleApiClient.Builder(this)
          .addApi(LocationServices.API)
          .addConnectionCallbacks(this)
          .addOnConnectionFailedListener(this)
          .build();
  
      //Setup LocationRequest
      this.locationRequest = LocationRequest.create()
              .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY)
              .setInterval(1000 * 10)
              .setInterval(1000 * 3);
  
      if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &amp;&amp; ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
          return;
      }
      LocationServices.FusedLocationApi.requestLocationUpdates(googleApiClient, locationRequest, this);
  }
  @Override
  public void onStart(){
      super.onStart();
      this.googleApiClient.connect();
  }
  
  @Override
  public void onStop(){
      super.onStop();
      this.googleApiClient.disconnect();
  }
  </code></pre>
  
  <p>Exception:</p>
  
  <pre><code>08-27 22:54:04.536 11610-11610/at.ideafactory.spotted E/AndroidRuntime: FATAL EXCEPTION: main
                                                                      Process: at.ideafactory.spotted, PID: 11610
                                                                      java.lang.RuntimeException: Unable to start activity ComponentInfo{at.ideafactory.spotted/at.ideafactory.spotted.Activity.Main.MainActivity}: java.lang.IllegalStateException: GoogleApiClient is not connected yet.
                                                                          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596)
                                                                          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2653)
                                                                          at android.app.ActivityThread.access$800(ActivityThread.java:156)
                                                                          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1355)
                                                                          at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                          at android.os.Looper.loop(Looper.java:157)
                                                                          at android.app.ActivityThread.main(ActivityThread.java:5872)
                                                                          at java.lang.reflect.Method.invokeNative(Native Method)
                                                                          at java.lang.reflect.Method.invoke(Method.java:515)
                                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
                                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:674)
                                                                          at dalvik.system.NativeStart.main(Native Method)
                                                                       Caused by: java.lang.IllegalStateException: GoogleApiClient is not connected yet.
                                                                          at com.google.android.gms.internal.zzpy.zzd(Unknown Source)
                                                                          at com.google.android.gms.location.internal.zzd.requestLocationUpdates(Unknown Source)
                                                                          at at.ideafactory.spotted.Activity.Main.MainActivity.onCreate(MainActivity.java:108)
                                                                          at android.app.Activity.performCreate(Activity.java:5312)
                                                                          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1111)
                                                                          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2552)
                                                                          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2653) 
                                                                          at android.app.ActivityThread.access$800(ActivityThread.java:156) 
                                                                          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1355) 
                                                                          at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                          at android.os.Looper.loop(Looper.java:157) 
                                                                          at android.app.ActivityThread.main(ActivityThread.java:5872) 
                                                                          at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                          at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858) 
                                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:674) 
                                                                          at dalvik.system.NativeStart.main(Native Method) 
  </code></pre>
  
  <p>Maybe anyone could help me with this problem.</p>
  
  <p>Kind Regards</p>