I recently try twitter app on Android-based phone ( HTC HD Desire , I guest).
With twitter app, when I try to ‘tweet’ a message, my twitter app on the phone notify the change nearly in real-time.
I did some search and found out I could get “message” from Twitter in JSON format, but is that true that my app on android phone must have a separate thread running in the background to get information from server in some kind of format ( like JSON ..) than update my wall on the phone ??
If this really happened, I think it would be a disaster for my phone because it’s should have run out of battery very soon.
Is there anyway to get the same result but not having a thread run in background to do the checking-updating work ?
If you want the updates to come through in real time, you’ll have a Service running in the background that’s constantly polling.
Alternatively you could put the heavy lifting to server side and implement a push mechanism. Upside, better battery life for your client. Downside, you have to pay money for infrastructure that will poll twitter, then push to clients.