private void showInvitations() { Intent intent = ((BaseGameActivity) getActivity()).getGamesClient().getInvitationInboxIntent(); startActivityForResult(intent, RC_INVITATION_INBOX); GoogleAnalyticsHelper.sendEvent( getActivity().getApplicationContext(), EventCategory.ui_action, EventAction.button_press, "show_invitations"); }
private void invitePlayersToMyGame() { // launch the player selection screen Intent intent = ((BaseGameActivity) getActivity()) .getGamesClient() .getSelectPlayersIntent(mNbPlayers - 1, mNbPlayers - 1); getActivity().startActivityForResult(intent, RC_SELECT_PLAYERS); GoogleAnalyticsHelper.sendEvent( getActivity().getApplicationContext(), EventCategory.ui_action, EventAction.button_press, "invite_players"); }
private void startQuickGame() { Bundle am = RoomConfig.createAutoMatchCriteria(1, mNbPlayers - 1, 0); // build the room config: RoomConfig.Builder roomConfigBuilder = ((GameActivity) getActivity()).makeBasicRoomConfigBuilder(); roomConfigBuilder.setAutoMatchCriteria(am); RoomConfig roomConfig = roomConfigBuilder.build(); // create room: ((BaseGameActivity) getActivity()).getGamesClient().createRoom(roomConfig); GoogleAnalyticsHelper.sendEvent( getActivity().getApplicationContext(), EventCategory.ui_action, EventAction.button_press, "quick_game"); }