At the moment there is a backing node+express+socket.io. In the android application (enterprise app) a socket.io client that constantly foreground the service keeps the connection with ws server. It's not cool, because it consumes a lot of energy and quickly runs down the battery + there is no 100% stability (there are problems with the death of the session, after which it properly it does not resume, and need to send additional http requests).
I would like to get rid of constant connection, if possible and foreground service thereby increasing the stability and life time (stability is more important and a battery can be sacrificed). For this, I suppose, to use a different technology for delivery of notices instead of the WS what - need your advice. He glances in the direction of the firebase, but don't know how this is a good solution.
Task: need buck to send the notification to specific client (uid) or group of clients (group-id, which correspond to some uid). In this case, the delivery notification must be timely, not more than 30 seconds from the time of sending, wherein the display device can be blocked for several hours probusgasse (connect to the Internet suppose that is always there, but if the message was sent at the time when and the client was not connected, the notification still has to come).
Throw off tips/ideas, share your experiences)