• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps I need to keep in contact with my server through an Android app.

The problem is, I need to request a page to my server every 5 seconds. I am using a service that loads a httpclient every 5 seconds. I'm worried that this will take up too much battery, will it? Is there any easier way to keep communication to a server?
 
Is it 100% required that it hit the server every 5 seconds? I'm not sure of the needs of your app, but could you potentially due some caching, or are you looking for new data in that 5 second interval?
 
Yes, the user could post a message at any time, and I need to get that message to the phone ASAP, so the service I am trying to make can be "instant"
 
Back
Top Bottom