Android Background Processing
Jun 28 2018 · Video Course (1 hr, 23 mins) · Beginner
Mobile apps use a main thread to show their UI and interact with a user. Overloading the main thread can harm the user experience. Learn to use background threads, the new WorkManager, and Android Services to let your app download and process data while maintaining UI performance.
Version
- Kotlin 1.2, Android 4.4+, Studio 3.1.2
Threads and AsyncTasks
Find out what's covered in our Android Background Processing video tutorial series: Threads, AsyncTasks, JobScheduler, WorkManager, and Services.
1The Starter Project
2:39Download the starter app, build it in Android Studio, & review the app code. See the utility functions we'll use to make network calls & save data to storage.
2Multithreading
3:07Learn the definition of a thread, see the concepts of concurrency and multithreading, and be introduced to the app main thread.
3Background Threads
4:16See how to create and start a thread instance using the java.lang.Thread class and a java.lang.Runnable.
4Message Handlers
5:42Separate threads have no inherent means of communicating with one another. See how to use Handlers to send messages from a background thread to the main thread.
5Practice what you've learned so far to create a background thread and pass data back to the main thread.
6AsyncTasks
5:23Learn about a thread abstraction in the Android SDK named AsyncTask that simplifies using background threads and sending results to the main thread.
7Practice what you've learned to create an AsyncTask of your own that makes a network call in the background and passes results to the main thread.
8Conclusion
1:02Let's review what you've covered on threads and AsyncTask in this first part of Android Background Processing, and then discuss what's next.
9JobScheduler and WorkManager
Introduction
2:06Learn about the need for efficient battery use for your background processing, and get an introduction to APIs that let you schedule work with the Android OS.
10Learn about the class that lets you define the work that you will schedule with the Android OS using JobScheduler.
11JobScheduler
2:54See how to use the JobScheduler API to schedule the background synchronization of a remote file with your device storage.
12Practice what you've learned about JobScheduler and JobService to schedule your own JobService that logs a string on a background thread.
13WorkManager
6:06Get an introduction to the new WorkManager API in Android Jetpack that will eventually replace JobScheduler as the API to use to schedule work with the OS.
14Conclusion
1:09Let's review what you've covered about JobScheduler and WorkManager in this second part of Android Background Processing, and then discuss what's next.
15Services
Introduction
1:12Get an introduction to the Android Service class and what you'll learn about on Services in this part of the course.
16Android Services
2:48Define Android Service-related terminology and see the various types of Services along with their typical uses.
17IntentService
5:14Use an IntentService to run a potentially long-running task on a built-in background thread that completes when the task is done.
18See how to use a BroadcastReceiver to send local broadcasts from a background IntentService that are received by the main thread.
19Practice what you've learned about IntentService and BroadcastReceiver to download a data file and update the Photos screen when the download is complete.
20Foreground Service
5:36See how to use a Foreground Service to allow your app to perform a long-running task like playing media when the rest of the app is in the background.
21Notifications
4:42Learn how to use a notification to let your Foreground Service run on later versions of Android, including with a NotificationChannel on Android O and above.
22Conclusion
2:13In this final episode, we'll summarize this last part and the whole course, and then see an overview of Background Processing topics that were not covered.
23
Comments