1

I added two achievements for test purposes.I have a Long variable whose name is longScore1.I can save the score, but the user does not gain XP.My goal is to give users XP. Here my codes;

  GamesClient gamesClient = Games.getGamesClient(MainActivity.this, GoogleSignIn.getLastSignedInAccount(this));
        gamesClient.setViewForPopups(findViewById(R.id.container_pop_up));

        Games.getAchievementsClient(this, GoogleSignIn.getLastSignedInAccount(this))
                .unlock(getString(R.string.achievement_paaaa));

        longScore1+=80;
Ugur Gul
  • 53
  • 9

1 Answers1

0

XP Points are handled as "Achievements", and Achievement has to be registered to the google play console.

https://developers.google.com/games/services/common/concepts/achievements#creating_an_achievement

Please refer to this API document

maxswjeon
  • 100
  • 1
  • 11
  • i know this document.after i read this document already i added two achievements.I don't know if there is an error in the code section. Thank you for your help. – Ugur Gul Feb 04 '19 at 06:10