Can an async task send periodically a result to the GUI?
For example: I have 3 things I’d like my async task to do. After each thing, I’d like
to send a string back to the gui: "task x completed"
Can I do this without creating 3 async tasks?
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.
Yes. Check out the method onProgressUpdate() and publishProgress().
Here’s an example i found very quickly, which may or may not work. But I think you have enough information to figure it out for yourself.
Updating progress dialog in Activity from AsyncTask