Currently i have the following working fine:
- Server side Socket (Java program) running on a linux box : listen mode
- Client Side Socket on android device : connects to server
- then communication happens as expected (eg send text and echo it back)
However: If i want the server to send some message to the android device (when the CLIENT is NOT connected) - what is the best way to do it?
(in other words - some kind of "push" notification)
- Timer to have client keep connecting to the server at specific intervals (seems inefficient)
- Android device can register for some intent that a request is received(is this even possible)?
- GCM (seems like one way of doing it - but not sure if this is the only way)
- Anything else?
Thanks,
flyingbag