Smack, Getting Error in creating new MultiChat
Question
I am using asmack for creating a chat app. For creating a MultiUserChat i am using following code.
muc= new MultiUserChat(HomeActivity.connection, "chatRoom@conference.live-images.com");
try
{
muc.create(HomeActivity.connection.getUser());
muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));
muc.join("kam");
}
catch (XMPPException e)
{
e.printStackTrace();
}
But i an getting the error.
Class CastException. & if i remove the Confrence from new MUC() then I get Server Not Responsing Error.
Where i am wrong? Do i have to use some Patch.
Solution
it would be better to send more details like the stack trace. Make sure you follow the code example here: Multi User Chat
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow