Does the asynchronous operation of an AsyncTask
run in DoInBackground
or OnPostExecute
?
public class Task1 : AsyncTask
{
protected override void OnPreExecute()
{
}
protected override Java.Lang.Object DoInBackground(params Java.Lang.Object[] @params)
{
return true;
}
protected override void OnPostExecute(Java.Lang.Object result)
{
}
}
Update
What I think I meant to ask was if the routine/procedure/task that runs in DoInBackground
is necessarily a thread, or is it more of an abstract concept of a task and if so is it scheduled to run as such (i.e. can it also be configured to run on the main thread). Similarly, is the "continuation" that runs in OnPostExecute
also considered a task, since it runs on the main thread, but can also be "scheduled" to run with other "task's" on the same thread (like a click handler or on a lifetime override like onResume)?