Offline Support by CometChat - Chat that keeps working when the network doesn’t

CometChat’s Chat SDKs now work offline. Conversations load from the device, messages sent without a connection queue up and survive a restart, and missed changes sync back on reconnect. Off by default, on with one setting at init, with optional encryption for the local cache. Live in our JavaScript, Android, iOS, Flutter, and React Native SDKs.

Add a comment

Replies

Best

Hello again PH 👋

As builders we all know the zero internet zone. However brief it is, users blame the product, not the tunnel they just drove into.

That is even truer in any app doing real time communications.

So when a send fails and there is no way to queue it and push it out when service returns, the user is left confused and annoyed.

This is not a novel problem. Solving it at scale is a different beast, because the queue and the cache have to hold up with millions of end users sitting on them. That is the beast this release takes on.

It is out in our SDKs now. The UI kits get it in a couple of weeks.

For anyone curious how it works under the hood:

  • Opens from the device: conversation lists and history load from a local cache first, then refresh from the server.

  • Sends with no connection: the message goes into a durable outbox and shows as pending, not failed. It survives an app restart and goes out on reconnect.

  • Catches up on its own: when the network returns, queued messages send and missed changes sync back.

  • Cleans up after itself: the cache belongs to the user, not the device. A logout, an expired session, or a different user signing in clears it, and anything still unsent goes with it.

  • No surprises: off by default, one setting at init, and every method still returns the same promise. With it off, nothing changes at all. Encrypting the local cache is one more flag, at rest on the device.

Try it out! And drop me a line if you find something interesting/glitching :)