I am developing a chat client using Socket.io as a means of communicating with the server. As such, using GCM is not exactly an option.
I want be able to receive chats at any time (even if the application is closed); essentially the socket needs to be listening at all times. I understand that a service can be started when the phone boots and kept running. However, this seems to be a rather bad idea on a mobile device, draining battery and the like.
Researching, it seems that GCM is the most common implementation for this sort of issue. Unfortunately, I cannot replace Socket.io at the moment. I was wondering how I would go about implementing this chat design - having a socket listening in the background.