title: How to completely kill/remove/delete/stop an AsyncTask
body: <p>I made an app that downloads videos from our server.
  The issue is:</p>
  
  <p>When i cancel the downloading i call:</p>
  
  <pre><code>myAsyncTask.cancel(true)
  </code></pre>
  
  <p>I noticed, that <code>myAsyncTask</code> doesn't stops on calling cancel... my <code>ProgressDialog</code> still goes up and its like jumping from status to status showing me that each time I cancel and start again an <code>AsyncTask</code> by clicking the download button, a new <code>AsyncTask</code> starts...
  Each time I click download.. then cancel, then again download a separate <code>AsyncTask</code> starts.</p>
  
  <p>Why is <code>myAsynTask.cancle(true)</code> not cancelling my task ? I don't want it anymore on the background. I just want to completely shut it down if I click cancel.</p>
  
  <p>How to do it ?</p>
  
  <p>E D I T: </p>
  
  <p>Thanks to gtumca-MAC, and the others who helped me did it by:</p>
  
  <pre><code>while (((count = input.read(data)) != -1) &amp;&amp; (this.isCancelled()==false)) 
  {
      total += count;
      publishProgress((int) (total * 100 / lenghtOfFile));
      output.write(data, 0, count);
  }
  </code></pre>
  
  <p>Thanks!!!</p>