DalvikVM[localhost:8604]
Thread [<1> main] (Running)
Thread [<7> Binder Thread #2] (Running)
Thread [<6> Binder Thread #1] (Running)
Thread [<8> AsyncTask #1] (Running)
Thread [<9> Binder Thread #3] (Running)
Thread [<10> Binder Thread #4] (Running)
Thread [<11> AsyncTask #2] (Running)
Thread [<12> AsyncTask #3] (Running)
While running my application i have seen this in the debug window.
I am wondering is this correct? Should there be these many tasks running.
For example Thread [<8> AsyncTask #1] (Running)
This task downloads a file from a web server. When the task is complete should this not disappear from the above list?
Am i not ending the task correctly?
Tabletask = new CreateTablesTask();
Tabletask.execute();
class CreateTablesTask extends AsyncTask<Object, Integer, Boolean> {
ProgressDialog pleaseWaitDialog;
@Override
protected void onCancelled() {
pleaseWaitDialog.dismiss();
}
@Override
protected void onPreExecute() {
pleaseWaitDialog = ProgressDialog.show(Activity.this, "Test", "Downloading", true, true);
pleaseWaitDialog.setOnCancelListener(new OnCancelListener() {
public void onCancel(DialogInterface dialog) {
}
});
}
@Override
protected void onProgressUpdate(Integer... values) {
super.onProgressUpdate(values);
}
protected Boolean doInBackground(Object... arg0) {
//Some code in here
return null;
}
protected void onPostExecute(Boolean result) {
PleaseWaitDialog.dismiss();
return;
}
}