Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can we access archive messages into android application from xmpp server

I took a brief overview on xmpp.org website, and read all things related to message archiving(XEP-0136 protocol). After reading all document, still i am not getting exact way to start implementation on that things into my android application. Any one here can help me, how can we implement, accessing of message archive at client hand. I am using smack library for this in my application.

like image 434
sumeet Avatar asked Jul 26 '11 12:07

sumeet


1 Answers

First, ensure that your server implements XEP-0136. Many don't.

Next, you'll want to create your own subclass of IQ. See OfflineMessageRequest for an example. You need getters and setters for all of the sub-elements of the archive protocol.

Penultimately, register your IQ handler with ProviderManager.addIQProvider.

Lastly, write a controller class that sends the IQs, waits for the results, and processes the semantics of the protocol. See OfflineMessageManager for a XEP-0013 example which is similar to what you want.

like image 80
2 revs Avatar answered Sep 28 '22 04:09

2 revs