public interface

Invitation

implements Freezable<Invitation> Participatable Parcelable
com.google.android.gms.games.multiplayer.Invitation
Known Indirect Subclasses

Class Overview

Data interface for an invitation object.

Summary

Constants
int INVITATION_TYPE_REAL_TIME Constant indicating that this invitation is for a real-time room.
int INVITATION_TYPE_TURN_BASED Constant indicating that this invitation is for a turn-based match.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Methods
abstract int getAvailableAutoMatchSlots()
Return the maximum number of available automatch slots for this invitation.
abstract long getCreationTimestamp()
Retrieve the server timestamp at which this Invitation was created.
abstract Game getGame()
Retrieve the Game object that this Invitation is associated with.
abstract String getInvitationId()
Retrieve the ID of this Invitation.
abstract int getInvitationType()
Retrieve the type of this Invitation.
abstract Participant getInviter()
Retrieve the Participant who created this Invitation.
abstract int getVariant()
Retrieve the variant specified for this Invitation, if any.
[Expand]
Inherited Methods
From interface com.google.android.gms.common.data.Freezable
From interface com.google.android.gms.games.multiplayer.Participatable
From interface android.os.Parcelable

Constants

public static final int INVITATION_TYPE_REAL_TIME

Constant indicating that this invitation is for a real-time room.

Constant Value: 0 (0x00000000)

public static final int INVITATION_TYPE_TURN_BASED

Constant indicating that this invitation is for a turn-based match.

Constant Value: 1 (0x00000001)

Public Methods

public abstract int getAvailableAutoMatchSlots ()

Return the maximum number of available automatch slots for this invitation. If automatch criteria were not specified during creation, or if all slots have been filled, this will return 0.

Returns
int The maximum number of additional players that can be added to this game.

public abstract long getCreationTimestamp ()

Retrieve the server timestamp at which this Invitation was created.

Returns
long The server timestamp at which this Invitation was created.

public abstract Game getGame ()

Retrieve the Game object that this Invitation is associated with.

Returns
Game Game object for this Invitation.

public abstract String getInvitationId ()

Retrieve the ID of this Invitation.

Returns
String The ID of this Invitation.

public abstract int getInvitationType ()

Retrieve the type of this Invitation. May be either INVITATION_TYPE_REAL_TIME or INVITATION_TYPE_TURN_BASED.

Returns
int The type of the Invitation.

public abstract Participant getInviter ()

Retrieve the Participant who created this Invitation.

Returns
Participant The Participant who created this Invitation.

public abstract int getVariant ()

Retrieve the variant specified for this Invitation, if any. A variant is an optional developer-controlled parameter describing the type of game to play. If specified, this value will be a positive integer. If this invitation had no variant specified, returns ROOM_VARIANT_DEFAULT or MATCH_VARIANT_DEFAULT.

Returns
int Variant specified for this invitation, if any.