com.google.android.gms.games.multiplayer.Invitations |
Entry point for invitations functionality.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Invitations.LoadInvitationsResult | Result delivered when invitations have been loaded. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns an intent that will let the user see and manage any outstanding invitations.
| |||||||||||
Asynchronously load the list of invitations for the current game.
| |||||||||||
Asynchronously load the list of invitations for the current game.
| |||||||||||
Register a listener to intercept incoming invitations for the currently signed-in user.
| |||||||||||
Unregisters this client's invitation listener, if any.
|
Returns an intent that will let the user see and manage any outstanding invitations. Note
that this must be invoked using 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 an invitation to accept, the result will be RESULT_OK
and the data intent will contain the selected invitation as a parcelable extra in the
extras. Based on the type of the match (TTMP/RBMP), the result will include either
EXTRA_TURN_BASED_MATCH
or EXTRA_INVITATION
.
Required API: API
Required Scopes: SCOPE_GAMES
apiClient | The GoogleApiClient to service the call. |
---|
Intent
that can be started to view the invitation inbox UI.
Asynchronously load the list of invitations for the current game.
Required API: API
Required Scopes: SCOPE_GAMES
apiClient | The GoogleApiClient to service the call. |
---|---|
sortOrder | How to sort the returned invitations. Must be either
SORT_ORDER_MOST_RECENT_FIRST or
SORT_ORDER_SOCIAL_AGGREGATION . |
PendingResult
to access the data when available.
Asynchronously load the list of invitations for the current game. Invitations are returned sorted by most recent first.
Required API: API
Required Scopes: SCOPE_GAMES
apiClient | The GoogleApiClient to service the call. |
---|
PendingResult
to access the data when available.
Register a listener to intercept incoming invitations for the currently signed-in user. If a listener is registered by this method, the incoming invitation will not generate a status bar notification as long as this client remains connected.
Note that only one invitation listener may be active at a time. Calling this method while another invitation listener was previously registered will replace the original listener with the new one.
Required API: API
Required Scopes: SCOPE_GAMES
apiClient | The GoogleApiClient to service the call. |
---|---|
listener | The listener that is called when a new invitation is received. The listener is called on the main thread. |
Unregisters this client's invitation listener, if any. Any new invitations will generate status bar notifications as normal.
Required API: API
Required Scopes: SCOPE_GAMES
apiClient | The GoogleApiClient to service the call.
|
---|