This interface is deprecated.
UsePlayersClient
instead
Entry point for player functionality.
Nested Class Summary
interface | Players.LoadPlayersResult | This interface is deprecated.Player
is returned directly in thePlayersClient .
|
Constant Summary
String | EXTRA_PLAYER_SEARCH_RESULTS | Used by the Player Search UI to return a list of parceled Player objects. |
Public Method Summary
abstractIntent |
getCompareProfileIntent(GoogleApiClient
apiClient,Player
player)
Returns an intent that will display a screen where the user can compare
themselves against another player's profile.
|
abstractPlayer | |
abstractString | |
abstractIntent |
getPlayerSearchIntent(GoogleApiClient
apiClient)
Returns an intent that will display a screen where the user can search for
players.
|
abstractPendingResult<Players.LoadPlayersResult> |
loadConnectedPlayers(GoogleApiClient
apiClient, boolean forceReload)
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
|
abstractPendingResult<Players.LoadPlayersResult> |
loadInvitablePlayers(GoogleApiClient
apiClient, int pageSize, boolean forceReload)
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
|
abstractPendingResult<Players.LoadPlayersResult> |
loadMoreInvitablePlayers(GoogleApiClient
apiClient, int pageSize)
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
|
abstractPendingResult<Players.LoadPlayersResult> |
loadMoreRecentlyPlayedWithPlayers(GoogleApiClient
apiClient, int pageSize)
Asynchronously loads an additional page of players that the signed-in player
has played multiplayer games with recently.
|
abstractPendingResult<Players.LoadPlayersResult> | |
abstractPendingResult<Players.LoadPlayersResult> |
loadPlayer(GoogleApiClient
apiClient,StringplayerId,
boolean forceReload)
Loads the profile for the requested player ID.
|
abstractPendingResult<Players.LoadPlayersResult> |
loadRecentlyPlayedWithPlayers(GoogleApiClient
apiClient, int pageSize, boolean forceReload)
Load the initial page of players the currently signed-in player has played
multiplayer games with recently, starting with the most recent.
|
Constants
public static finalString EXTRA_PLAYER_SEARCH_RESULTS
Used by the Player Search UI to return a list of parceled Player objects. Retrieve
with
Intent.getParcelableArrayListExtra(String)
.
Public Methods
public abstractIntent getCompareProfileIntent(GoogleApiClient apiClient,Player player)
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
Activity.startActivityForResult(Intent, int)
,so that the identity of the
calling package can be established.
Required API:Games.API
Required Scopes:Games.SCOPE_GAMES
Parameters
apiClient | TheGoogleApiClient
to service the call. |
---|---|
player |
Returns
- An
Intent
that can be started to display the player profile.
public abstractPlayer getCurrentPlayer(GoogleApiClient apiClient)
Get the current signed in player, if available.
Required API:Games.API
Required Scopes:Games.SCOPE_GAMES
Parameters
apiClient | TheGoogleApiClient
to service the call. |
---|
Returns
Player
representing the currently signed in player. May be null if an error occurred while communicating with the games service.
public abstractStringgetCurrentPlayerId(GoogleApiClient apiClient)
Get the current signed in player ID, if available.
Required API:Games.API
Required Scopes:Games.SCOPE_GAMES
Parameters
apiClient | TheGoogleApiClient
to service the call. |
---|
Returns
- The player ID for the currently signed in player. May be null if an error occurred while communicating with the games service.
public abstractIntent getPlayerSearchIntent(GoogleApiClient apiClient)
Returns an intent that will display a screen where the user can search for players.
Note that this must be invoked with
Activity.startActivityForResult(Intent, int)
,so that the identity of the
calling package can be established.
If the user canceled, the result will beActivity.RESULT_CANCELED
.
If the user selected any players from the search results list, the result will be
Activity.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:Games.API
Required Scopes:Games.SCOPE_GAMES
Parameters
apiClient | TheGoogleApiClient
to service the call. |
---|
Returns
- An
Intent
that can be started to display the player selector.
public abstractPendingResult<Players.LoadPlayersResult> loadConnectedPlayers(GoogleApiClient apiClient, boolean forceReload)
This method is deprecated.
Google+ no longer integrated so social APIs will not work as expected. SeePlay
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:Games.API
Required Scopes:Games.SCOPE_GAMES
Parameters
apiClient | TheGoogleApiClient
to service the call. |
---|---|
forceReload | Iftrue ,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 tofalse
to gain advantages of data caching. |
public abstractPendingResult<Players.LoadPlayersResult> loadInvitablePlayers(GoogleApiClient apiClient, int pageSize, boolean forceReload)
This method is deprecated.
Google+ no longer integrated so social APIs will not work as expected. SeePlay
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 Alpha betically by name.
Required API:Games.API
Required Scopes:Games.SCOPE_GAMES
Parameters
apiClient | TheGoogleApiClient
to service the call. |
---|---|
pageSize | 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 | Iftrue ,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 tofalse
to gain advantages of data caching. |
Returns
PendingResult
to access the data when available.
public abstractPendingResult<Players.LoadPlayersResult> loadMoreInvitablePlayers(GoogleApiClient apiClient, int pageSize)
This method is deprecated.
Google+ no longer integrated so social APIs will not work as expected. SeePlay
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:Games.API
Required Scopes:Games.SCOPE_GAMES
Parameters
apiClient | TheGoogleApiClient
to service the call. |
---|---|
pageSize | The number of additional entries to request. This must be a value between 1 and 25. |
Returns
PendingResult
to access the data when available.
public abstractPendingResult<Players.LoadPlayersResult> loadMoreRecentlyPlayedWithPlayers(GoogleApiClient apiClient, int pageSize)
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:Games.API
Required Scopes:Games.SCOPE_GAMES
Parameters
apiClient | TheGoogleApiClient
to service the call. |
---|---|
pageSize | The number of additional entries to request. This must be a value between 1 and 25. |
Returns
PendingResult
to access the data when available.
public abstractPendingResult<Players.LoadPlayersResult> loadPlayer(GoogleApiClient apiClient,String playerId)
Loads the profile for the requested player ID.
Required API:Games.API
Required Scopes:Games.SCOPE_GAMES
Parameters
apiClient | TheGoogleApiClient
to service the call. |
---|---|
playerId | The player ID to get full profile data for. |
Returns
PendingResult
to access the data when available.
public abstractPendingResult<Players.LoadPlayersResult> loadPlayer(GoogleApiClient apiClient,String playerId, boolean forceReload)
Loads the profile for the requested player ID.
Required API:Games.API
Required Scopes:Games.SCOPE_GAMES
Parameters
apiClient | TheGoogleApiClient
to service the call. |
---|---|
playerId | The player ID to get full profile data for. |
forceReload | Iftrue ,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 tofalse
to gain advantages of data caching. |
Returns
PendingResult
to access the data when available.
public abstractPendingResult<Players.LoadPlayersResult> loadRecentlyPlayedWithPlayers(GoogleApiClient apiClient, int pageSize, boolean forceReload)
Load the initial page of players the currently signed-in player has played multiplayer games with recently, starting with the most recent.
Required API:Games.API
Required Scopes:Games.SCOPE_GAMES
Parameters
apiClient | TheGoogleApiClient
to service the call. |
---|---|
pageSize | 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 | Iftrue ,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 tofalse
to gain advantages of data caching. |
Returns
PendingResult
to access the data when available.