title: Standalone Worker Thread or IntentService?
body: <p>I'm new to Android. I've been reading several posts and documentation about Threads/Services, and I still can't figure out which would be the most suitable solution for my app, so I was wondering if you could give me your advice.</p>
  
  <p>My main UI is supposed to have "start" and "stop" buttons. "start" would create a Thread that starts writing info (i.e battery statistics, RSSI, or whatever) to a file. After pressing "start", I will be switching to other applications, so my UI will be on "Stopped" state (If I didn't misunderstand the life cycle). Eventually, I will come back to my app and I want to be able to stop the thread.</p>
  
  <p>For a long-running task like downloading/upload a large file I read the most suitable way is to have an IntentService, so that even if the application is stopped (or destroyed if not enough memory) the services continues its task until finished. As in my app the service won't stop by itself (I want it to be stopped with a stopService command), is a service still the best way to proceed? or should I just use a worker thread as my UI is not likely to be killed under normal circumstances?</p>
  
  <p>Would you recommend writing directly to a file, or using sqlite?</p>