Skip navigation

Communicate with the UI from AsyncTask

Communicate with the UI from AsyncTask: Android Development: Concurrent Programming
Communicate with the UI from AsyncTask: Android Development: Concurrent Programming

The code that runs in the doInBackground() method of an AsyncTask can’t communicate with the activity’s main thread. But just like with threads and handlers, there’s a way to pass information to another method that is running on the main thread. When you declare a subclass of AsyncTask, its second generic type is for progress values. The type can be a simple string, but you can also pass complex objects with multiple properties.

Resume Transcript Auto-Scroll
Skill Level Intermediate
1h 52m
Duration
15,654
Views
Show More Show Less
Skills covered in this course
Developer Mobile Apps Android

Continue Assessment

You started this assessment previously and didn't complete it. You can pick up where you left off, or start over.

Start My Free Month

Start your free month on LinkedIn Learning, which now features 100% of Lynda.com courses. Develop in-demand skills with access to thousands of expert-led courses on business, tech and creative topics.

Start My Free Month