예제 #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?
   }
 }
예제 #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?
   }
 }
예제 #3
0
 @Override
 public void getAchievementsGPGS() {
   startActivityForResult(
       Games.Achievements.getAchievementsIntent(gameHelper.getApiClient()), ACHIEVEMENTS_REQUEST);
 }
예제 #4
0
 @Override
 public void getLeaderboardGPGS() {
   startActivityForResult(
       Games.Leaderboards.getAllLeaderboardsIntent(gameHelper.getApiClient()),
       LEADERBOARD_REQUEST);
 }
예제 #5
0
 @Override
 public void unlockAchievementGPGS(String achievementId) {
   Games.Achievements.unlock(gameHelper.getApiClient(), achievementId);
 }
예제 #6
0
 @Override
 public void submitScoreGPGS(int score, String leaderboardId) {
   Games.Leaderboards.submitScore(gameHelper.getApiClient(), leaderboardId, score);
 }
예제 #7
0
 @Override
 public void unlockAchievement(String achievementId) {
   if (isSignedIn() == true) Games.Achievements.unlock(_gameHelper.getApiClient(), achievementId);
 }