I am getting class cast exception while creating muc in android.
E/AndroidRuntime(31002): Caused by: java.lang.ClassCastException:
org.jivesoftware.smack.packet.DefaultPacketExtension
E/AndroidRuntime(31002): at
org.jivesoftware.smackx.muc.MultiUserChat.getMUCUserExtension(MultiUserChat.java:2000)
E/AndroidRuntime(31002): at
org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:364)
You can create user Group by ,
If you wated to create Group Chat in xmpp try the following method. (** UNCHECKED )
Use This Code
Step:- 1. create one function i.e createMulti_User_Chat();
code of the createMulti_User_Chat() function
in this function multiUserChat.invite(studio,"Join My Group"); in method you want friends list which you want to invite for this group.
2. before calling your login you just call this Configure the Provider manager manually before you LOGGING IN with this method
3. this method using- configure(ProviderManager.getInstance()); before you LOGGING IN i.e connection.login(USERNAME, PASSWORD);
Version 4.2.0-beta1 is not allowing us to access the
MultiUserChat
class.I found an answer in the Smack documentation
Just Create a multi user chat room using this code
Now your room will be created and you can add people with nick name into that particular room
Use this code to join a room
Now room is created and joined and you can start the group chat as similar to simple one to one chat