I want to write an app that will listen for alarm messages whenever it is in the range of a server (on the same WiFi network). What is the best way to do this?
Should I simply write a service that will act as a TCP/IP server and when it receives messages, have them generate an Android notification? or is there a better way to do this?
I need this app to be running all the time while Android is running. How would I ensure that my 'listener' service is always running?
thanks in advance..
Levster
I had same problem... I wanted to use comet but I havent much time to research about it..
you can see some sample here.. http://blogs.webtide.com/dyu/entry/android_chat_using_jetty_cometd
and I choosed infinite loops for communication
here is my code..