Android SDK - Conversation disappear and empty conversation id
Hai Rainbow Support,
We found some issue in Rainbow conversation.
We have some conversation that already inactive for a long time. Then when we get list conversations, the conversations disappear. When we try to get the conversation with
RainbowSDK.instance.conversations.getConversationFromRoom(room)
or
RainbowSDK.instance.conversations.getConversationFromContact(contactJID)
The conversation id for returned conversation is empty.
We use Android SDK 1.60.0
Please, advice
-
Hi Muhammad,
In fact, on Android, when you call the method getConversationFromRoom(), you will receive a Conversation object. And this conversation is added to the list of conversations. So your list should be updated.
Once you have that conversation, you could call as usual the method getMessagesFromConversation(conversation) to display the list of conversation
The fact that there is no "id" in that conversation informs you that the conversation is only opened locally on your device. If you connect with an other application (ex Rainbow Web), you will not show that conversation. The only way to have it open for all your devices is when you add or receive a message in that conversation. It seems that what you saw in the web client today is an issue...
What is still strange is why your conversation disappears after a while. After checking internally, conversation is not closed when bubble is inactive. So the only explanation is that perhaps you have opened a web client that have a limitation on the number of conversations opened. Doing that, Web client has automatically closed some conversations if you are above this threshold.
Could you check that you can do what you want with these explanations ?
Don't hesitate if something is still missing ?
Olivier
-
Hi Muhammad,
As the Android SDK automatically synchronizes with the Rainbow server, when using these function, you can have 2 cases:
- You receive a conversation with an ID: This indicates that the conversation is opened on server and so is available for all your devices (sync on all devices.
- You receive a conversation without an ID: This indicates that the conversation has been created only on your mobile device and so is not sync with the server.
But a soon as you sent a message to the server or receive one, the SDK synchronizes that conversation and so an ID will be available.
So when using these function, the SDK makes no request to Rainbow, either a conversation exists (from server) or a new local conversation is created (can be used to read only existing messages)
Hope that helps,
Regards,
Olivier
Please sign in to leave a comment.
Comments
5 comments