I am working with XMPP for implementing chat in my Android application and i have used Smack API for it. My Chat is working fine and i am saving all the chat messages on Android Device locally.Following are some problems that i am currently facing.
- During Chat if somehow connection lost then it takes to much time to reconnect again and sometimes it dont even gets connected. Even after the connection is connected, It stop sending chat message as it is not receiving on other side anymore.I have initialized the resources again but it works sometimes
- I want to use FCM to send message if my USER is disconnected (offline). I have implemented FCM for other things and its working fine. But i want to know how do i use FCM with SMACK API if user on otherside is offline. I am trying but i don't know the proper way of FCM implementation with XMPP.
- I am unable to get the presence of the User on other side during chatting.
Please suggest me the proper way of XMPP(openfire) smack implementation. So, that it works seamlessly like whatsapp. User gets connected immediately after internet reconnected or Activity open as new instance etc. Its 1 to 1 chat i.e only two users gets connected at a time. Thanks in advance and please don't downgrade my question as i am new in XMPP implementation.