New Course: Android Background Processing

Learn about letting your app do work behind the scenes, starting with Threads & AsyncTasks, moving on to scheduling work, and finishing up with Services.

We ask our mobile devices to do so many things at the same time, like play music while we use other apps, or let us use an app while it downloads and refreshes data behind the scenes. Background processing is a generic term we can use to describe how all these actions occur simultaneously.

In our new course, Android Background Processing, you’ll see how to take advantage of background processing in your Android apps, from doing two things at once, to having the OS do work for your app when it’s not running. We’ll cover all the basics you need to know to get started.

Take a look at what’s inside:

Part 1: Threads & AsyncTasks

  1. Introduction: Find out what’s covered in our Android Background Processing video course: Threads, AsyncTasks, JobScheduler, WorkManager, and Services.
  2. The Starter Project: Download 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.
  3. Multithreading: Learn the definition of a thread, see the concepts of concurrency and multithreading, and be introduced to the app main thread.
  4. Background Threads: See how to create and start a thread instance using the java.lang.Thread class and a java.lang.Runnable.
  5. Message Handlers: Separate 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.
  6. Challenge: Background Threads: Practice what you’ve learned so far to create a background thread and pass data back to the main thread.
  7. AsyncTasks: Learn about a thread abstraction in the Android SDK named AsyncTask that simplifies using background threads and sending results to the main thread.
  8. Challenge: AsyncTasks: Practice 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.
  9. Conclusion: Let’s review what you’ve covered on threads and AsyncTask in this first part of Android Background Processing, and then discuss what’s next.

Part 2: JobScheduler and WorkManager

  1. Introduction: Learn 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.
  2. JobService: Learn about the class that lets you define the work that you will schedule with the Android OS using JobScheduler.
  3. JobScheduler: See how to use the JobScheduler API to schedule the background synchronization of a remote file with your device storage.
  4. Challenge: JobScheduler: Practice what you’ve learned about JobScheduler and JobService to schedule your own JobService that logs a string on a background thread.
  5. WorkManager: Get 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.
  6. Conclusion: Let’s review what you’ve covered about JobScheduler and WorkManager in this second part of Android Background Processing, and then discuss what’s next.

Part 3: Services

  1. Introduction: Get an introduction to the Android Service class and what you’ll learn about on Services in this part of the course.
  2. Android Services: Define Android Service-related terminology and see the various types of Services along with their typical uses.
  3. IntentService: Use an IntentService to run a potentially long-running task on a built-in background thread that completes when the task is done.
  4. Broadcast Receiver: See how to use a BroadcastReceiver to send local broadcasts from a background IntentService that are received by the main thread.
  5. Challenge: IntentService: Practice what you’ve learned about IntentService and BroadcastReceiver to download a data file and update the Photos screen when the download is complete.
  6. Foreground Service: See 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.
  7. Notifications: Learn 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.
  8. Conclusion: In 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.

Where To Go From Here?

Want to check out the course? You can watch the course Introduction for free!

The rest of the course is for raywenderlich.com subscribers only. Here’s how you can get access:

  • If you are a raywenderlich.com subscriber: The first part of the course is ready for you today! The rest of the course will be released next week. You can check out the course here.
  • If you are not a subscriber yet: What are you waiting for? Subscribe now to get access to our new Android Background Processing course and our entire catalog of over 500 videos.

Stay tuned for more new and updated courses to come. I hope you enjoy the course! :]

Contributors

Comments