java.lang.Object | ||
↳ | com.google.android.gms.common.api.GoogleApi<com.google.android.gms.games.Games.GamesOptions> | |
↳ | com.google.android.gms.games.InvitationsClient |
A client to interact with invitations functionality.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a
Task which asynchronously loads an annotated InvitationBuffer
containing the list of invitations for the current game. | |||||||||||
Returns a
Task which asynchronously loads an annotated InvitationBuffer
containing the list of invitations for the current game. | |||||||||||
Returns a
Task which asynchronously registers callbacks to intercept incoming
invitations for the currently signed-in user. | |||||||||||
Returns a
Task which asynchronously unregisters this client's invitation callbacks, if
any and loads the result. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns a Task
which asynchronously loads 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.
The returned Task
can fail with a RemoteException
.
If the user cancelled 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
accessible from the
Bundle's extras.
Required Scopes: SCOPE_GAMES_LITE
Returns | |
---|---|
Task<Intent> |
Returns a Task
which asynchronously loads an annotated InvitationBuffer
containing the list of invitations for the current game. Invitations are returned sorted by
most recent first.
release()
should be called to release resources after usage.
Required Scopes: SCOPE_GAMES_LITE
Returns | |
---|---|
Task<AnnotatedData<InvitationBuffer>> |
Returns a Task
which asynchronously loads an annotated InvitationBuffer
containing the list of invitations for the current game.
release()
should be called to release resources after usage.
Required Scopes: SCOPE_GAMES_LITE
Parameters | |
---|---|
sortOrder |
int : How to sort the returned invitations. Must be either SORT_ORDER_MOST_RECENT_FIRST or SORT_ORDER_SOCIAL_AGGREGATION .
|
Returns | |
---|---|
Task<AnnotatedData<InvitationBuffer>> |
Returns a Task
which asynchronously registers callbacks to intercept incoming
invitations for the currently signed-in user. If callbacks are registered by this method, the
incoming invitation will not generate a status bar notification.
Note that only one invitation callback may be active at a time. Calling this method while another invitation callback was previously registered will replace the original callback with the new one.
Required Scopes: SCOPE_GAMES_LITE
Parameters | |
---|---|
callback |
InvitationCallback : The callback that is called when a new invitation is received. The callback is
called on the main thread.
|
Returns | |
---|---|
Task<Void> |
Returns a Task
which asynchronously unregisters this client's invitation callbacks, if
any and loads the result. The result will be true
if the callback was unregistered and
false
if this callback wasn't registered previously or is already unregistered. Any new
invitations will generate status bar notifications as normal.
Required Scopes: SCOPE_GAMES_LITE
Parameters | |
---|---|
callback |
InvitationCallback |
Returns | |
---|---|
Task<Boolean> |