我使用以下代码将用户的分数提交给 Google Play 游戏:
if(getApiClient().isConnected()){
Games.Leaderboards.submitScore(getApiClient(), getString(R.string.number_guesses_leaderboard),newScore);
}
Run Code Online (Sandbox Code Playgroud)
但这不会增加排行榜的分数,它只是替换分数。始终显示相同的值。newScore是我想要增加当前分数的数量。
android google-play-services android-studio google-play-games