MarkAsRead not working, Message listeners not working an dupdating chat list

Hello Team,

I am having trouble with markAsRead function, previously its working absolutely fine, but since last one week the markAsRead function is not working for both single and group chat.
I debug the code an dfound the listeners get retired after app get idle for sometime, or goes in background, I am checking for user logged in function of cometchat, if not logged in then I am calling sign in to cometchat again, but when it is logged in , Message Listeners not working. its really urgent please make the listeners working all the time, even app in background.
Please check asap my client is shouting as app is live on play store and app store

Thanks,
Shaheen

Hello @shaheen,

You can use the Connection Listeners to get real time status of the the connection to our WS servers. If you keep the app in background for a long time the connection to our WS server is broken and thus message listeners won’t work. But when you bring the app to the foreground state, it will reconnect and you will get the real time status in the Connection Listeners.

Documentation: https://prodocs.cometchat.com/docs/react-native-advanced-connection-listener

Warm Regards,

CometChat Pro
Mayur Bhandari

Hello Mayur,

is the connection listener available in 2.0.7 SDK?

Thanks,
Shaheen

Hello @shaheen,

Connection Listeners were added in the SDK version 2.0.8. However, I would suggest you use the latest SDK v2.1.1. You can follow the setup documentation required for the latest SDK here.

Warm Regards,

CometChat Pro
Mayur Bhandari

Hello Mayur,

I am getting this issue after CometChat version upgrade from 2.0.7 to 2.1.0.

Thanks
Shaheen

Hello @shaheen,

Please make sure that 2.1.0 has been correctly installed. Also, please make sure you have followed the setup guide I shared in my last reply. It looks like 2.1.0 is not installed and the app is still built on v2.0.7. If you are running metro-server then please restart the metro-server.

Warm Regards,

CometChat Pro
Mayur Bhandari

Hello @mayur.bhandari,
For iphone the version upgrade is done successfully, but for android I’m getting following issue constantly:

Please let me know how to fix this issue.

Thanks,
Shaheen