Android Background Processing
Sep 23 2022 · Kotlin 1.6, Android 12, Android Studio Chipmunk 2021.2.1
Part 1: Run Background Work
Notes: 01. Introduction
This course was originally recorded in 2020. It has been reviewed and all content and materials are updated as of September 2022.
Hey there! My name is Filip, and welcome to the Android Background Processing course! :]
In this course, you’ll learn about various mechanisms in Android, which will make asynchronous programming easier. Unlike Kotlin Coroutines, these concepts will rely on the Android ecosystem, rather than the Kotlin programming language.
Specifically, you’ll learn about the
WorkManager, the tried and tested API in Android, which helps you schedule work with constraints, that’s compatible with all versions of the Android API.
Then, you’ll implement various different types of
Services in Android, which are used for long running, background operations.
You’ll finish the course by revisiting legacy concepts, which came before the WorkManager API. The older concepts are being deprecated as we speak, but some applications may still use them, so it’s important to know what they are, and why they are being deprecated!
The AlarmManager API has been here since the first version of Android, and it’s used for scheduling tasks which need to be started at a specific time. It’s still useful when you’re working with alarms and wakeups, but there are better ways to schedule work these days!
Next, you have the AsyncTask API, which was used for a long time, to schedule work in the background, and return a result. It is a wholesome API, but it is prone to bugs and memory leaks, so new concepts emerged to replace it.
And the last legacy API is the
JobScheduler, which is similar to a WorkManager. It was introduced in Android Lollipop, so it’s not that old, and you can use it to schedule jobs which will run in the background, using special Services.
All of these concepts will be explained in more detail throughout the course, so stay on, and let’s embark on this cool journey together! :]