I am implementing a chat feature and now I got it working with socket io on nestjs and react native. Now I want that when the app is in background to get push notifications, and when in app get in-app notification.
Now what is the best way to do this:
should I store whether the app is in background with redis through websockets connects and disconnects and use that logic in the server.
Or should I just use websockets and kinda "simulate" push notifications on the frontend (don't know if possible)
Or should I only use push notifications for every message and handle them when the app is active
Or you tell me
Any help or suggestion would be helpful. Thanks