I want to implement something similar to the Stories feature in Facebook or WhatsApp.
Possible approaches :
At first, I wanted to open a web socket so I could receive the latest Stories updates (new story from a friend, or if a story was removed).
There'a another alternative - getting those updates using FCM pushes. A service which receives the pushes broadcasts the "new story"/"story removed" broadcast using a LocalBroadcastManager, and the suitable activity which is registered to this broadcast receives that update.
Using the push approach, it would mean that even if the app is killed, the push can still be triggered. It seems a bit of a waste.
But considering that there might slow connection, connection drops, etc., the websocket is also quite "vulnerable".
Also, what if 24 hours of a story expire, how do I make sure I always remove that story from the Stories list view and not keep displaying it ? With a socket, we may lose connection. if we reconnect after we were to supposed to be notified that the Story time expired, we would still display that Story.