ess()
    protected void onProgressUpdate(Integer... progress) {
        setProgressPercent(progress[0]);
    }

    // This is called when doInBackground() is finished
    protected void onPostExecute(Long result) {
        showNotification("Downloaded " + result + " bytes");
    }
}
</pre>
 
 <p>To execute this worker thread, simply create an instance and
 call <code><a href="../../reference/android/os/AsyncTask.html#execute(Params...)">execute()</a></code>:</p>
 
<pre>
new DownloadFilesTask().execute(url