How can we access archive messages into android application from xmpp server
I took a brief over开发者_StackOverflowview 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.
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.
精彩评论