com.google.android.gms.games.Players |
This interface is deprecated.
Use PlayersClient
instead
Entry point for player functionality.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Players.LoadPlayersResult |
This interface is deprecated.
Player is returned directly in the PlayersClient .
|
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | EXTRA_PLAYER_SEARCH_RESULTS | Used by the Player Search UI to return a list of parceled Player objects. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns an intent that will display a screen where the user can compare themselves against
another player's profile.
| |||||||||||
Get the current signed in player, if available.
| |||||||||||
Get the current signed in player ID, if available.
| |||||||||||
Returns an intent that will display a screen where the user can search for players.
| |||||||||||
This method is deprecated.
Google+ no longer integrated so social APIs will not work as expected. See
Play Games authentication adopting Google Sign-In API
| |||||||||||
This method is deprecated.
Google+ no longer integrated so social APIs will not work as expected. See
Play Games authentication adopting Google Sign-In API
| |||||||||||
This method is deprecated.
Google+ no longer integrated so social APIs will not work as expected. See
Play Games authentication adopting Google Sign-In API
| |||||||||||
Asynchronously loads an additional page of players that the signed-in player has played
multiplayer games with recently.
| |||||||||||
Loads the profile for the requested player ID.
| |||||||||||
Loads the profile for the requested player ID.
| |||||||||||
Load the initial page of players the currently signed-in player has played multiplayer games
with recently, starting with the most recent.
|
Used by the Player Search UI to return a list of parceled Player objects. Retrieve with getParcelableArrayListExtra(String)
.
See getPlayerSearchIntent(GoogleApiClient)
Returns an intent that will display a screen where the user can compare themselves against
another player's profile. Note that this must be invoked with startActivityForResult(Intent, int)
, so that the identity of the calling package can
be established.
Required API: API
Required Scopes: SCOPE_GAMES
Parameters | |
---|---|
apiClient |
GoogleApiClient : The GoogleApiClient to service the call. |
player |
Player |
Returns | |
---|---|
Intent |
An Intent that can be started to display the player profile.
|
Get the current signed in player, if available.
Required API: API
Required Scopes: SCOPE_GAMES
Parameters | |
---|---|
apiClient |
GoogleApiClient : The GoogleApiClient to service the call. |
Returns | |
---|---|
Player |
Player representing the currently signed in player. May be null if an error
occurred while communicating with the games service.
|
Get the current signed in player ID, if available.
Required API: API
Required Scopes: SCOPE_GAMES
Parameters | |
---|---|
apiClient |
GoogleApiClient : The GoogleApiClient to service the call. |
Returns | |
---|---|
String |
The player ID for the currently signed in player. May be null if an error occurred while communicating with the games service. |
Returns an intent that will display a screen where the user can search for players. Note that
this must be invoked with startActivityForResult(Intent, int)
, so that the
identity of the calling package can be established.
If the user canceled, the result will be RESULT_CANCELED
. If the user
selected any players from the search results list, the result will be RESULT_OK
, and the data intent will contain a list of parceled Player objects in
EXTRA_PLAYER_SEARCH_RESULTS
.
Note that the current Player Search UI only allows a single selection, so the returned list of parceled Player objects will currently contain at most one Player.
Required API: API
Required Scopes: SCOPE_GAMES
Parameters | |
---|---|
apiClient |
GoogleApiClient : The GoogleApiClient to service the call. |
Returns | |
---|---|
Intent |
An Intent that can be started to display the player selector.
|
This method is deprecated.
Google+ no longer integrated so social APIs will not work as expected. See
Play Games authentication adopting Google Sign-In API
Asynchronously loads a list of players that have connected to this game (and that the user has permission to know about).
Required API: API
Required Scopes: SCOPE_GAMES
Parameters | |
---|---|
apiClient |
GoogleApiClient : The GoogleApiClient to service the call. |
forceReload |
boolean : If true , this call will clear any locally cached data and attempt to
fetch the latest data from the server. This would commonly be used for something like a
user-initiated refresh. Normally, this should be set to false to gain advantages of
data caching. |
Returns | |
---|---|
PendingResult<Players.LoadPlayersResult> |
This method is deprecated.
Google+ no longer integrated so social APIs will not work as expected. See
Play Games authentication adopting Google Sign-In API
Load the initial page of players the currently signed-in player can invite to a multiplayer game, sorted alphabetically by name.
Required API: API
Required Scopes: SCOPE_GAMES
Parameters | |
---|---|
apiClient |
GoogleApiClient : The GoogleApiClient to service the call. |
pageSize |
int : The number of entries to request for this initial page. Note that if cached
data already exists, the returned buffer may contain more than this size, but it is
guaranteed to contain at least this many if the collection contains enough records. This
must be a value between 1 and 25. |
forceReload |
boolean : If true , this call will clear any locally cached data and attempt to
fetch the latest data from the server. This would commonly be used for something like a
user-initiated refresh. Normally, this should be set to false to gain advantages of
data caching. |
Returns | |
---|---|
PendingResult<Players.LoadPlayersResult> |
PendingResult to access the data when available. |
This method is deprecated.
Google+ no longer integrated so social APIs will not work as expected. See
Play Games authentication adopting Google Sign-In API
Asynchronously loads an additional page of invitable players. A new player buffer will be delivered that includes an extra page of results.
Required API: API
Required Scopes: SCOPE_GAMES
Parameters | |
---|---|
apiClient |
GoogleApiClient : The GoogleApiClient to service the call. |
pageSize |
int : The number of additional entries to request. This must be a value between 1 and
25. |
Returns | |
---|---|
PendingResult<Players.LoadPlayersResult> |
PendingResult to access the data when available. |
Asynchronously loads an additional page of players that the signed-in player has played multiplayer games with recently. A new player buffer will be delivered that includes an extra page of results.
Required API: API
Required Scopes: SCOPE_GAMES
Parameters | |
---|---|
apiClient |
GoogleApiClient : The GoogleApiClient to service the call. |
pageSize |
int : The number of additional entries to request. This must be a value between 1 and
25. |
Returns | |
---|---|
PendingResult<Players.LoadPlayersResult> |
PendingResult to access the data when available.
|
Loads the profile for the requested player ID.
Required API: API
Required Scopes: SCOPE_GAMES
Parameters | |
---|---|
apiClient |
GoogleApiClient : The GoogleApiClient to service the call. |
playerId |
String : The player ID to get full profile data for. |
Returns | |
---|---|
PendingResult<Players.LoadPlayersResult> |
PendingResult to access the data when available.
|
Loads the profile for the requested player ID.
Required API: API
Required Scopes: SCOPE_GAMES
Parameters | |
---|---|
apiClient |
GoogleApiClient : The GoogleApiClient to service the call. |
playerId |
String : The player ID to get full profile data for. |
forceReload |
boolean : If true , this call will clear any locally cached data and attempt to
fetch the latest data from the server. This would commonly be used for something like a
user-initiated refresh. Normally, this should be set to false to gain advantages of
data caching. |
Returns | |
---|---|
PendingResult<Players.LoadPlayersResult> |
PendingResult to access the data when available.
|
Load the initial page of players the currently signed-in player has played multiplayer games with recently, starting with the most recent.
Required API: API
Required Scopes: SCOPE_GAMES
Parameters | |
---|---|
apiClient |
GoogleApiClient : The GoogleApiClient to service the call. |
pageSize |
int : The number of entries to request for this initial page. Note that if cached
data already exists, the returned buffer may contain more than this size, but it is
guaranteed to contain at least this many if the collection contains enough records. This
must be a value between 1 and 25. |
forceReload |
boolean : If true , this call will clear any locally cached data and attempt to
fetch the latest data from the server. This would commonly be used for something like a
user-initiated refresh. Normally, this should be set to false to gain advantages of
data caching. |
Returns | |
---|---|
PendingResult<Players.LoadPlayersResult> |
PendingResult to access the data when available.
|