Is it possible to launch onResume only after AsyncTask is finished?
No, you need to follow the Activity Lifecycle
. And the AsyncTask
is asynchronous so that it can run while your UI
can still do other things. What you can do is put the code that is in onResume()
that you want to run after the task has finished in your onPostExecute()
method. There are other options but without seeing the code you are trying to run, this would be my suggestion.
Or is it possible to execute other functions after AsyncTask is finished (in general)?
Yes. You can put that code in another Activity
method and call that from onPostExecute()
You also can use getStatus()
method of AsyncTask
to run code based on the Status of your AsyncTask