I would like to know how it works. I have read the documentation a couple of times but don’t get the idea.
I noticed that in some cases onPostExecute does nothing.
Can anyone please give me a little explanation?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
AsyncTaskis a class derived fromThreadand provides you a simple and proper way of doing some things in the background with the ability of notifying theUI Thread.In order to use it you should create a
class, whichextendsit and define the type parameters. They areParams,ProgressandResult. Read about them more here.onPostExecute()is a method which is called whendoInBackground()finished it’s execution, butonPostExecute()is run on the UI Thread. So, you can notify the UI about the work has been done.You can see an example of
AsyncTaskusage here.