Ejemplo n.º 1
0
 @Override
 public void showScores() {
   if (isSignedIn() == true)
     startActivityForResult(
         Games.Leaderboards.getLeaderboardIntent(
             _gameHelper.getApiClient(), getString(R.string.leaderboard_id)),
         REQUEST_CODE_UNUSED);
   else {
     // Maybe sign in here then redirect to showing scores?
   }
 }
Ejemplo n.º 2
0
 @Override
 public void submitScore(long score) {
   if (isSignedIn() == true) {
     Games.Leaderboards.submitScore(
         _gameHelper.getApiClient(), getString(R.string.leaderboard_id), score);
     //
     //	startActivityForResult(Games.Leaderboards.getLeaderboardIntent(_gameHelper.getApiClient(),
     // getString(R.string.leaderboard_id)), REQUEST_CODE_UNUSED);
   } else {
     // Maybe sign in here then redirect to submitting score?
   }
 }
Ejemplo n.º 3
0
 @Override
 public void getAchievementsGPGS() {
   startActivityForResult(
       Games.Achievements.getAchievementsIntent(gameHelper.getApiClient()), ACHIEVEMENTS_REQUEST);
 }
Ejemplo n.º 4
0
 @Override
 public void getLeaderboardGPGS() {
   startActivityForResult(
       Games.Leaderboards.getAllLeaderboardsIntent(gameHelper.getApiClient()),
       LEADERBOARD_REQUEST);
 }
Ejemplo n.º 5
0
 @Override
 public void unlockAchievementGPGS(String achievementId) {
   Games.Achievements.unlock(gameHelper.getApiClient(), achievementId);
 }
Ejemplo n.º 6
0
 @Override
 public void submitScoreGPGS(int score, String leaderboardId) {
   Games.Leaderboards.submitScore(gameHelper.getApiClient(), leaderboardId, score);
 }
Ejemplo n.º 7
0
 @Override
 public void unlockAchievement(String achievementId) {
   if (isSignedIn() == true) Games.Achievements.unlock(_gameHelper.getApiClient(), achievementId);
 }