Make your Android apps more efficient with concurrent programming. Learn how to create and manage background threads using intent services, AsyncTask, JobScheduler, and a few useful Android APIs.
- My name is David Gassner. Welcome to this course on programming with background threads in Android apps. I'll start by showing you how to create and start background threads, and how to use handlers to manage a thread's message queue. Then I'll move on to architectures that are unique to Android. I'll describe how to use async task objects to manage background processing in an activity, and intense services that run automatically in background threads. I'll also demonstrate the JobScheduler API that lets you hand off background tasks to a system-level process.
I'll then show a couple of frameworks that implement background threads for you, including Android's Loader framework and the open-source Retrofit library. I hope this course helps you advance your understanding of concurrent processing and asynchronous programming in Android.
First, discover how to create and start simple background threads, and how to use handlers to manage a thread's message queue. Then, learn various methods for optimizing the scheduling and performance of background tasks in Android with AsyncTask, intent services, and the JobScheduler API. Plus, explore tools that help you implement multithreading for different tasks in Android: Loader, for asynchronous data loading, and the open-source API Retrofit, for making HTTP requests.
Note: To get the most out of this course, you should be comfortable programming with Java, and should understand the most basic skills that are needed to build Android apps with the Android SDK and Android Studio.
- Creating and running a background thread
- Sending messages to the UI from threads
- Managing multiple background threads
- Managing threads with AsyncTask
- Managing long-running tasks with services
- Scheduling background tasks with JobScheduler
- Using other APIs for concurrent programming