Xmpp in Android with php server : <p>I am developing an app in which there is a chatting functionality also , except chat my rest app is done now i want to integrate chat in my app for which i am trying xmpp , i have tried a sample for xmpp with my own jabbered server and its working.
Following are my question are
1.How to integrate my app php data with jabbered server to show list of user chatting with there image , name , time and last message like the whats app chat list etc. like the image below<a href="https://i.stack.imgur.com/JDlde.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JDlde.png" alt="enter image description here"></a></p>

<p>2.Flow of xmpp , like how its works example first the message is sent to FCM then to jabbered server and then to Device or it works differentely.</p>

<ol start="3">
<li>How to manage chat history , do i need local database to maintain it or jabbered help for history also.</li>
</ol>

<p>Any suggestion , link , example will be appreciated Thanks.</p>
