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