Retrieve chat history between two users from ejabberd server using smack
<p>I am working on a chat application. I am using <code>smack</code> library in my android application and <code>ejabberd</code> as my XMPP server . I implemented everything I wanted but I couldn't fetch the chat history between two user . Note that I am not talking about <code>group chat</code> or <code>chat room</code> . Just chat history between two users . Chat history is already enabled in the server and I can fetch the chat history in web , but not in my android application . I have looked all the question related to this topic in SO, but couldn't find a example code . </p>

<p>Any help would be highly appreciated. </p>