title: How do I implement Google Play Game services in my app in Android Studio?
body: <p>I'm trying to figure out exactly how to implement Google Play Game services in my app. On the Google Play Developer Console I've linked the game the relevant app using the SHA1 key and I know how to add leaderboards and achievements on here. I have also installed the Google Play services and Google Repository to Android Studio and added the dependency into <code>build.gradle</code> (as explained here: <a href="http://developer.android.com/google/play-services/setup.html" rel="nofollow">http://developer.android.com/google/play-services/setup.html</a>) but I wasn't sure <strong>how to do the last 2 steps on that page (creating a Proguard exception and ensuring devices have the Google Play services APK) and if they are necessary</strong> - the latter of which even the Google Play Games sample projects don't seem to do.  </p>
  
  <p>Moreover, <strong>I'm not sure what code I actually need to put in my project to enable leaderboards and achievements</strong>, since according to this guide: <a href="https://developers.google.com/games/services/android/achievements" rel="nofollow">https://developers.google.com/games/services/android/achievements</a>, I use this code:</p>
  
  <pre><code>Games.Achievements.unlock(mGoogleApiClient, "my_achievement_id");
  </code></pre>
  
  <p>to unlock an achievement, for example, but there are no instructions on how I set up <code>mGoogleApiClient</code>. <strong>I've looked at the sample projects but it's still not clear what I'm supposed to do</strong>. Am I meant to copy and paste all of the code into my project? Are there certain sections I'm supposed to copy and paste? Do I have to write my own code for signing in to Google Play Games?</p>