我正在尝试显示没有标准用户界面的玩家的当前得分和排名。问题是等级总是-1。我已经显示了标准的排行榜UI,我的位置是“1”(我是唯一的玩家xD)。我无法想象出了什么问题。这是我的代码。
Games.Leaderboards.loadCurrentPlayerLeaderboardScore(mGoogleApiClient, getString(R.string.leaderboard_global),
LeaderboardVariant.TIME_SPAN_ALL_TIME, LeaderboardVariant.COLLECTION_PUBLIC).setResultCallback(new ResultCallback<Leaderboards.LoadPlayerScoreResult>() {
@Override
public void onResult(final Leaderboards.LoadPlayerScoreResult scoreResult) {
if(scoreResult != null && scoreResult.getStatus().isSuccess()) {
mGeneralScore = scoreResult.getScore();
mGeneralScore.getRawScore();//return the score
mGeneralScore.getRank();//return -1
mGeneralScore.getDisplayRank();//return "unknow"
}
}
});