Quantcast
Channel: Ignite Realtime: Message List
Viewing all articles
Browse latest Browse all 11593

Unable to get PayloadItem in HandlePublishedItems

$
0
0

Hello, I am having issues with handlePublishedItems. I am trying to extract the payload sent from my PubSub, but I keep getting the following error:

5673-5703/app.test.com.myxmpp E/AbstractXMPPConnection﹕ Exception in packet listener     java.lang.ClassCastException: org.jivesoftware.smackx.pubsub.Item cannot be cast to org.jivesoftware.smackx.pubsub.PayloadItem

 

This is my following code for handlePublishedItems:

 

 

Here is the payload I am sending:

leafNode.send(new PayloadItem("test " + System.currentTimeMillis(), new SimplePayload("book", "pubsub:test:book", "Two Towers")));

 

 

I am following the example directly from here:

https://www.igniterealtime.org/builds/smack/docs/latest/documentation/extensions /pubsub.html

 

 

Any help is appreciated.

Thank you!


Viewing all articles
Browse latest Browse all 11593

Trending Articles