title: Which strategy to choose when doing long running tasks on Android?
body: <p>I am creating an application that will download around 30 images. Let's say it takes more than 10 seconds. I have been reading about <code>AsyncTask</code> and I guess that it shouldn't be used since the task will take more than a couple of seconds.</p>
  
  <blockquote>
    <p>AsyncTasks should ideally be used for short operations (a few seconds
    at the most.) If you need to keep threads running for long periods of
    time, it is highly recommended you use the various APIs provided by
    the java.util.concurrent pacakge such as Executor, ThreadPoolExecutor
    and FutureTask.</p>
  </blockquote>
  
  <p>When looking at the API for <code>ASyncTask</code> I see there are methods that can publish to the UI thread. If I have understood it right a more proper way to do long running task is to use a <code>FutureTask</code>? That means that I have to post updates to the UI thread myself. Is it correct that you use the <a href="http://developer.android.com/reference/android/view/View.html#post%28java.lang.Runnable%29" rel="nofollow"><code>post(Runnable)</code> method of View</a>?</p>
  
  <p>I could need some guidance whether or not I am on the right track.</p>