Answer the question
In order to leave comments, you need to log in
Using WebSocket in an Android Application?
Is it recommended to use a websocket in a service to maintain a persistent connection? What are the pitfalls? How does this affect battery life? How is event notification implemented in applications such as VKontakte, for example? Is it permissible to use websocket as an alternative to Google Cloud Message, and in what cases?
Answer the question
In order to leave comments, you need to log in
1. A persistent connection is most conveniently implemented on sockets.
2. Pitfalls - reconnect and session recovery. It is necessary to receive the data that was transferred during the disconnect.
5. I can assume that GCM still works asynchronously, and the socket is needed for a permanent connection (for example, for chats or online games)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question