what is max count scoreBoardService.getTopNRankers ?

0 votes

scoreBoardService.getTopNRankers(WinName, 300, new App42CallBack() {  

int nTopSize = 0;

public void onSuccess(Object response)   

{  

    Game game = (Game)response;  

    nTopSize = game.getScoreList().size();

but nTopSize is 100? max count is 100? 

 

 

asked Jul 10, 2016 in Android by exceeduniverse (10 points)
recategorized Jul 11, 2016 by shepAdmin

1 Answer

0 votes

Hi,

 

In order to answer your query, max size of getTopNRankers is 100. If you need to find records above 100, then you have to use paging method. Please find below code snippet for the same and let me know if it helps:

 

String gameName = "<Enter_your_game_name>";
int max = 10;
 
scoreBoardService.setPageOffset(0); // Next page your offset will be 11 and so on.
Game game = scoreBoardService.getTopNRankers(gameName,max); 
System.out.println("Game Name is : "+game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
System.out.println("score is : " + game.getScoreList().get(i).getValue());
System.out.println("Created On is  :"+game.getScoreList().get(i).getCreatedOn());
System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}

 

Regards,

Himanshu Sharma

answered Jul 11, 2016 by hs00105 (2,005 points)
Can you please elaborate on this , it is giving varied results mostly repetitive, and none of these start with the top score?
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...