title: How to use Google Play Game Services with LibGdx
body: <p>I would like to use achievement and leaderboards from Google Play Game Services API in my LibGDX Android Game. The only thing I've achieved is getting examples from Game Services developer website running. I've been trying to use this code in my project for many days and I still got nothing. I've also tried to follow this tutorial <a href="http://helios.hud.ac.uk/u1070589/blog/?p=202">http://helios.hud.ac.uk/u1070589/blog/?p=202</a> but I don't have "main game class (the one that extends from ApplicationListener)" which is required in step 7. I've got only</p>
  
  <ul>
  <li>public class DogeJump extends Game </li>
  <li>public class MainActivity extends AndroidApplication  implements IActivityRequestHandler</li>
  <li>public class BaseScreen implements Screen </li>
  <li>public class GameScreen extends BaseScreen //which is responsible for the gameplay</li>
  </ul>
  
  <p>This is onCreate method from MainActivity.java </p>
  
  <pre><code>    protected void onCreate(Bundle savedInstanceState) {
  
             super.onCreate(savedInstanceState);
          thingy=this;
  
          RelativeLayout layout=new RelativeLayout(this);
          requestWindowFeature(Window.FEATURE_NO_TITLE);
          getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
          getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
          View gameView=initializeForView(new DogeJump(this),false);
  
          adView=new AdView(this,AdSize.IAB_MRECT,"ca-app-pub-XXXXXXX363095/9011689567");
  
          adView.loadAd(new AdRequest());
  
          layout.addView(gameView);
          RelativeLayout.LayoutParams adParams=new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);
          adParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
          adParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
          layout.addView(adView,adParams);       
  
  
  
          setContentView(layout);
  
          //initialize(new DogeJump(this),false);
      }
  </code></pre>