AnsweredAssumed Answered

Smack 4.1.0 Presence type

Question asked by Leos on May 7, 2015
Latest reply on May 7, 2015 by Flow

Hi, I'm using Smack 4.1.0 on Android.


The XMPP server returns presence type 'online' instead of 'available' and because of that I'm getting IllegalArgumentException and Smack disconnect me from the server.

Stack trace:


Connection closed with error

    java.lang.IllegalArgumentException: online is not a constant in org.jivesoftware.smack.packet.Presence$Type

            at java.lang.Enum.valueOf(

            at org.jivesoftware.smack.packet.Presence$Type.valueOf(

            at org.jivesoftware.smack.packet.Presence$Type.fromString(

            at org.jivesoftware.smack.util.PacketParserUtils.parsePresence(PacketParserUtils.j ava:527)

            at org.jivesoftware.smack.util.PacketParserUtils.parseStanza(PacketParserUtils.jav a:155)

            at org.jivesoftware.smack.AbstractXMPPConnection.parseAndProcessStanza(AbstractXMP

            at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$400( 139)

            at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPC

            at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$200(XMPPTCPCon

            at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$



I know that the 'online' is correct way, but I'm not able to change it on the server side. Is there any way to handle it? Maybe disable parsing Presence stanzas would help.