How can we initialize MultiuserChat, these are the details, to create an object of MultiuserChat class we need the connection and room name as parameters // this is the constructor of MultiUserChat
public MultiUserChat(Connection connection, String room) {
this.connection = connection;
this.room = room.toLowerCase();
init();
}
its only applicable if we have a room ie. if we are inside a room. My question is if we are not inside the room, or we are not joined/created any rooms how can we initialize the MultiUserChat class. Because for adding listeners such as invitation rejection and addinvitationListener we need the object of the MultiUserChat.
eg. muc.addInvitationRejectionListener(new InvitationRejectionListener() {
@Override
public void invitationDeclined(String invitee, String reason) {
Log.e("CHECK", "Invitation rejected, Inv- "+invitee+": Reas- "+reason);
Toast.makeText(getApplicationContext() , "Invtn REJECTED, invitee- "+invitee+" :reason-"+reason,
Toast.LENGTH_LONG).show();
}
});