Reputation: 32094
I'm writing a bingo application for android.
bingo game has alerts and notifications that supposed to go from the server to the client on real time.
the client also needs to notify the server in real time whenever he yells bingo or any other events.
now.. my question is, what's the recommended method for two ways communication between server and android client?
should I use websockets? regular sockets? long polling ? anything else ?
if I use sockets as the method of choice, what happens when the cellular phone is changing wan networks ? do i need to detect such a thing and reconnect the socket?
any information regarding the issue would be greatly appreciated.
Upvotes: 0
Views: 752
Reputation: 12136
The easiest method is to use Android GCM for server to client communication, and a RESTful API for client to server communication.
You can even try Parse
library, that comes with their own SDK and solves most of the configuration.
Upvotes: 1