code:
RoomInfo info = MultiUserChat.getRoomInfo(xmppConnection, entry.getJid());
then cast exception!
detail exception:
java.lang.RuntimeException: java.lang.ClassCastException: org.jivesoftware.smack.packet.DefaultPacketExtension
…
E/AndroidRuntime( 1847): Caused by: java.lang.ClassCastException: org.jivesoftware.smack.packet.DefaultPacketExtension
E/AndroidRuntime( 1847): at org.jivesoftware.smackx.Form.getFormFrom(Form.java:69)
E/AndroidRuntime( 1847): at org.jivesoftware.smackx.muc.RoomInfo.(RoomInfo.java:90)
E/AndroidRuntime( 1847): at org.jivesoftware.smackx.muc.MultiUserChat.getRoomInfo(MultiUserChat.java:238)
Flow
2
Do you use aSmack? If so, did you follow the instructions from the README?
Otherwise please state your used Smack version.
packet log:
11:45:03 AM SNT
11:45:03 AM RCV http://jabber.org/protocol/muc#roominfo心得群020140823T05:08:34
Flow
4
Sorry, I notice that there is a language barrier here, but this doesn’t answer any of my questions.
hi, thanks for you answer!
i did not use aSmack, and use xabber(version 0.9.3b) smack/smackx
maybe xabber use aSmack, i’m not sure!
thanks for everyone!
I’v solved this problem, must add this code:
ProviderManager pm = ProviderManager.getInstance();
pm.addExtensionProvider(“x”, “jabber:x:data”, new DataFormProvider());
…
RoomInfo info = MultiUserChat.getRoomInfo(xmppConnection, entry.getJid());
so, solved this problem.