Open GoogleCodeExporter opened 8 years ago
[deleted comment]
I know what the problem is. DiscoverInfo is derived from IQ. Code under
ServiceDiscoveryManager:discoverInfo is trying to Downcast IQ to DiscoverInfo.
Downcasting IQ to discoverInfo is causing java.lang.ClassCastException:
org.jivesoftware.smack.util.PacketParserUtils$2
Original comment by Lopez.Sa...@gmail.com
on 14 May 2012 at 11:26
I had same issue while retrieving offline messages from openfire server. I had
also trying it with Offlinemessagemanager class but it doesn't work for me. So
I found a solution on that and its finely working on my side.
I did register a simple message listener with the connection object immediate
after log in and able to receive offline messages from server.
Original comment by che...@kratin.co.in
on 30 Mar 2013 at 7:29
Dear Chetan,
I am a newbie in Andriod programming and I am now creating an app for XMPP.
The OfflineMessageManager class doesn't work for me either.
It simple throws NullPointerException.
I wonder if you could help me solve it.
Thank you.
My code:
OfflineMessageManager offlineManager = new OfflineMessageManager(connection);
// Log.i("Offline Message", "supportsFlexibleRetrieval = " +
offlineManager.supportsFlexibleRetrieval());
Iterator<Message> it = offlineManager.getMessages();
while (it.hasNext()) {
Message m = it.next();
String fromName = m.getFrom();
Date currentDate = new Date();
String text = m.getBody() + " (offline)";
// ...
}
offlineManager.deleteMessages();
Priere
Original comment by Priere...@gmail.com
on 6 Jun 2013 at 3:05
Hello Priere,
As mention in my comment, you should register simple message listener immediate
after login code, then you should able to get offline message coming from
server.
As you mentioned in your code , you are using OfflineMessageManager class and
try to retrieve offline message from that. But when I go with this approach it
doesn't work for me.
Hope so this answer helps you.
You can feel free to contact me on my mail address for any related queries.
Thanks.
Have happy coding.
Original comment by che...@kratin.co.in
on 6 Jun 2013 at 4:41
add this...in your code before ServiceDiscoveryManager, here pm is the Provider
Manager Instance....
pm.addIQProvider("offline","http://jabber.org/protocol/offline", new OfflineMessageRequest.Provider());
// Offline Message Indicator
pm.addExtensionProvider("offline","http://jabber.org/protocol/offline", new OfflineMessageInfo.Provider());
its working in my case...:)
Original comment by shrey.sh...@divergentsl.com
on 13 Feb 2014 at 7:16
Original issue reported on code.google.com by
chirag.s...@indianic.com
on 14 Sep 2011 at 11:10