I've an application which receives and sends data (JSON) from/to a HTTP server via HTTP POST requests. There is not really any payload except of a few strings, so I'm wondering if it would make sense to build this whole HTTP communication as an Android Service or just to create a separate thread within my application?
A:
A thread should be fine unless you need to download data when your application won't be on screen.
AshtonBRSC
2009-10-07 10:05:29
Agreed. Though, if your app is downloading this data for other purposes than displaying it onscreen in some format (if it's truly a background maintenance task) then it might be more correct to make it a service.
Klondike
2009-10-08 00:19:19
Thanks for the quick answers. I will build it as a separate thread for now.
znq
2009-10-08 08:23:31