com.google.android.gms.games.multiplayer.Invitation

Here are the examples of the java api class com.google.android.gms.games.multiplayer.Invitation taken from open source projects.

1. MainActivity#handleInvitationInboxResult()

Project: android-basic-samples
File: MainActivity.java
// Handle the result of the invitation inbox UI, where the player can pick an invitation
// to accept. We react by accepting the selected invitation, if any.
private void handleInvitationInboxResult(int response, Intent data) {
    if (response != Activity.RESULT_OK) {
        Log.w(TAG, "*** invitation inbox UI cancelled, " + response);
        switchToMainScreen();
        return;
    }
    Log.d(TAG, "Invitation inbox UI succeeded.");
    Invitation inv = data.getExtras().getParcelable(Multiplayer.EXTRA_INVITATION);
    // accept invitation
    acceptInviteToRoom(inv.getInvitationId());
}