This class is deprecated.
Real-time multiplayer and Turn-based multiplayer support is being shut down on March 31, 2020. See Multiplayer deprecation
A client to interact with invitations functionality.
Public Method Summary
Inherited Method Summary
asynchronously loads an
will let the user see and manage any outstanding invitations. Note that this must be
startActivityForResult(Intent, int) so that the identity of the calling
package can be established.
Task can fail with a
If the user cancelled the result will be
If the user selected an invitation to accept, the result will be
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_INVITATION accessible from the Bundle's extras.
public Task<AnnotatedData<InvitationBuffer>> loadInvitations ()
public Task<AnnotatedData<InvitationBuffer>> loadInvitations (int sortOrder)
release() should be called to release resources after usage.
public Task<Void> registerInvitationCallback (InvitationCallback callback)
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.
|callback||The callback that is called when a new invitation is received. The callback is called on the main thread.|
public Task<Boolean> unregisterInvitationCallback (InvitationCallback callback)
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.