0

In my android app i m using open feint and i m facing problem in getting my rank(current player). how do i get that.here is my code.

     //hard coded for example
long scoreValue = 60;
    Score s = new Score(scoreValue, null); 
    Leaderboard l = new Leaderboard(String.valueOf(HomeScreen.LeaderBoardId));
    s.submitTo(l, new Score.SubmitToCB() {
        @Override
        public void onSuccess(boolean newHighScore) {

            System.out.println("Score submitted successfully");

        }

        @Override
        public void onFailure(String exceptionMessage) {
            Toast.makeText(GameScreen.this,
                    "Error (" + exceptionMessage + ") posting score.",
                    Toast.LENGTH_SHORT).show();

        }
    });
User u= OpenFeint.getCurrentUser();

    int rank=s.rank;
    System.out.println("RANK"+rank);

i can get the user details but i dont know how do i get my rank. i m stuck.please help. thanks in advance.

1 Answers1

0

Rank is not set when you submit a score. See this discussion for details.

You have to use the leaderboard to get the rank. Also openfient is being replaced with GREE, so if you are just starting you may want to switch to the new platform.

sww314
  • 1,252
  • 13
  • 17