2

I am implementing Google Play game services and use leader board for submitting scores. It permits to sign in to google plus but not display submitted scores through submitScore(leaderboard_id, score) and display 0 player while I am already signed in with test account. I checked in both ready to publish and published mode of leader board. I checked in OnScoreSubmittedListener, it fails with STATUS_NETWORK_ERROR_OPERATION_FAILED.

public void onsubmitscore(View view){
    getGamesClient().submitScoreImmediate(new OnScoreSubmittedListener() {

        @Override
        public void onScoreSubmitted(int arg0, SubmitScoreResult arg1) {
            // TODO Auto-generated method stub
            Toast.makeText(MainActivity.this,  ""+arg1,Toast.LENGTH_LONG).show();
        }
    }, getString(R.string.leaderboard_hard), 39999);
}

i am able to share game link on google plus but it is displaying 0 player in circle without any score. please help me soon.

ultimate
  • 717
  • 2
  • 10
  • 20
  • Here is answer for you: http://stackoverflow.com/questions/43303542/google-game-service-leaderboard-cant-show-after-submit-score-on-cocos2d-x-andro/43309175#43309175 – Nguyễn Duy Nguyên Apr 09 '17 at 16:39

4 Answers4

2

Although it may sound stupid but just to be sure...Are you submitting a score greater then the one you have configured on the console to be the min value for that leaderboard?

Dhruv
  • 165
  • 1
  • 7
1

There is a possibility you are not signed in when this error occurs. Make sure to perform some sort of check, such as getGamesClient.isConnected() or isSignedIn(). Usually, my procedure is to check both and respond accordingly.

Abandoned Cart
  • 4,512
  • 1
  • 34
  • 41
  • i signed in and able to see my google plus account. but it shows 0 player and not updated any leaderboard score. – ultimate Sep 07 '13 at 04:51
  • One other suggestion was to enable real-time multiplayer to force real-time responses, but I have not seen this improve anything. I am looking into the issue further, as I suddenly have previously working leaderboards doing the same thing. – Abandoned Cart Sep 07 '13 at 18:29
0

Check the Testing item under Game Services for your game. Game Services appears to have its own set of test accounts independent of those set through Settings in the Developer Console.

With test accounts listed only in the Developer Console (i.e. not in Game Services), I can test a game itself as well as achievements. However, when testing leader boards I see the same error you report (STATUS_NETWORK_ERROR_OPERATION_FAILED). When I add the test accounts to Testing under Game Services, the error goes away and leader boards function properly.

There isn't really anything in the documentation that suggests this should happen, and the behavior is inconsistent (achievements work; leader boards don't).

Eliodorus
  • 109
  • 8
0

Use

Games.Leaderboards.submitScoreImmediate(apiclient, leaderboardID, score);

I've been having the same issue; Achievements have been unlocked fine, Scores not so. Finally I looked at the google apis and this method seems to work.

user3774630
  • 256
  • 2
  • 10