Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to allow user to use loadConnectedPlayers

I want to get all connected players to game. I can get players that are in google+ circles but I want the player to get all users. I can't find what permission do I need to do this.

I am using this code to get players, but it always returns 0.

PendingResult<LoadPlayersResult> players = Games.Players.loadConnectedPlayers(mGoogleApiClient, false);

players.setResultCallback(new ResultCallback<Players.LoadPlayersResult>()
{
    @Override
    public void onResult(LoadPlayersResult result) 
    {
        PlayerBuffer buf = result.getPlayers(); 
        Toast.makeText(getApplicationContext(), "players"+buf.getCount(), Toast.LENGTH_SHORT).show();
    }
}); 
like image 954
Dzzeeee Avatar asked Sep 10 '25 00:09

Dzzeeee


1 Answers

this had been pre-announced and then announced a while ago already and method .loadConnectedPlayers() had been deprecated... which merely boils down to, that Google+ had been separated from Play Games and the functionality you are looking for is not available anymore.

in order to get a list of connected players, you would have to use your own API now. Just seen the question is old and had been posted before the announce - nevertheless this appears to be the current status.

like image 82
Martin Zeitler Avatar answered Sep 12 '25 12:09

Martin Zeitler