Code example for Invitation

Methods: getInvitationId

0
        // If this was the games client and it came with an invite, store it for 
        // later retrieval. 
        if (mClientCurrentlyConnecting == CLIENT_GAMES && connectionHint != null) {
            debugLog("onConnected: connection hint provided. Checking for invite."); 
            Invitation inv = connectionHint.getParcelable(GamesClient.EXTRA_INVITATION);
            if (inv != null && inv.getInvitationId() != null) {
                // accept invitation 
                debugLog("onConnected: connection hint has a room invite!"); 
                mInvitationId = inv.getInvitationId();
                debugLog("Invitation ID: " + mInvitationId);
            } 
        } 
 
        // connect the next client in line, if any. 
        connectNextClient(); 
		 
	} 
 
	public void onDisconnected() { 
		debugLog("onDisconnected."); 
Experience pair programming with AI  Get Codota for Java