title: How can I get API client? (Google Play Services)
body: <p>I am trying to do online rating and achivments in my app, used google play services. I do it at first time and I can't understand how it must be in code.</p>
  
  <pre><code>Games.Achievements.unlock(client, "CgkI2qWM-fIQEAIQAQ");
  Games.Achievements.increment(client, "CgkI2qWM-fIQEAIQAQ", 1);
  </code></pre>
  
  <p>So, my question. How can i get Api client?</p>
  
  <p>I'm trying with this code, from docs. But get an error.</p>
  
  <pre><code>client = new GoogleApiClient.Builder(this)
          .addApi(Plus.API)
          .addScope(Plus.SCOPE_PLUS_LOGIN)
          .setAccountName("myMail@gmail.com")
          .build();
          client.connect();
  </code></pre>
  
  <p>My logs</p>
  
  <pre><code>07-05 10:25:49.604: E/AndroidRuntime(14410): FATAL EXCEPTION: main
  07-05 10:25:49.604: E/AndroidRuntime(14410): java.lang.IllegalStateException: GoogleApiClient is not connected yet.
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at com.google.android.gms.internal.hn.a(Unknown Source)
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at com.google.android.gms.common.api.c.b(Unknown Source)
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at com.google.android.gms.games.internal.api.AchievementsImpl.unlock(Unknown Source)
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at com.pahanuch.candiesmaster.Main.Save(Main.java:1926)
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at com.pahanuch.candiesmaster.Main$4.run(Main.java:1912)
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at android.os.Handler.handleCallback(Handler.java:615)
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at android.os.Handler.dispatchMessage(Handler.java:92)
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at android.os.Looper.loop(Looper.java:137)
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at android.app.ActivityThread.main(ActivityThread.java:4745)
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at java.lang.reflect.Method.invokeNative(Native Method)
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at java.lang.reflect.Method.invoke(Method.java:511)
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
  07-05 10:25:49.604: E/AndroidRuntime(14410):    at dalvik.system.NativeStart.main(Native Method)
  </code></pre>