What Is The Difference Between Qbusers.signin And Qbchatservice.login?
Solution 1:
Quickblox makes use of 2 different sessions, 1.User Session, 2.Chat session. In order to retrieve user profile pictures, dialogs list and every thing you will need user session and in order to receive and send chat seamlessly you will need chat session.
But there is a catch. You cant establish chat session without user session. :) So you have to establish a user session first and then establish chat session after that.
So when user quits the app or when application terminates, you have to close the chat session (no need to close user session I mean you have to log out from chat not from user session) and once user brings the app to foreground check both user session and chat session whichever has expired and re-establish the same.
If you are wondering why to establish user session when I never logged out ,friend user session gets expiered automatically after 3 hours or so as per docs. So check if user session exists, if yes check chat session establish whichever is needed.
Additional info: Chat session is short lived compared to user session. In fact, you can fetch the chats as well for a dialog, if you have user session, but you cant send chat to that dialog without chat session. Thats what I meant when I said "in order to receive and send chat seamlessly you will need chat session".
Hope it helps. Any doubt am here to help you :)
Post a Comment for "What Is The Difference Between Qbusers.signin And Qbchatservice.login?"