开发者

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

开发者 https://www.devze.com 2023-03-22 19:35 出处:网络
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 st

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号