如何每周和每天都向排行榜提交分数?

时间:2019-02-12 16:59:13

标签: java android google-play-games leaderboard

我在申请中每次成功给90分。我可以提交分数,但是在每个选项卡中(同一时间每天一次)看到相同的分数。如何每天,每周提交分数? 这是我的代码;

 leaderboardsClient=Games.getLeaderboardsClient(this, GoogleSignIn.getLastSignedInAccount(this));
   leaderboardsClient.loadCurrentPlayerLeaderboardScore(getString(R.string.leaderboard_skor_tablosu),LeaderboardVariant.TIME_SPAN_ALL_TIME, LeaderboardVariant.COLLECTION_PUBLIC).addOnSuccessListener(new OnSuccessListener<AnnotatedData<LeaderboardScore>>() {
       @Override
       public void onSuccess(AnnotatedData<LeaderboardScore> leaderboardScoreAnnotatedData) {
           if (leaderboardScoreAnnotatedData != null) {
               if (leaderboardScoreAnnotatedData.get() != null) {
                   longScore = leaderboardScoreAnnotatedData.get().getRawScore();
                   leaderboardsClient.submitScore(getString(R.string.leaderboard_skor_tablosu),longScore+longScore1);

               }
           }
       }
   });

0 个答案:

没有答案