
Modern Android 13 Development Cookbook
By :

In the Understanding the Jetpack WorkManager library recipe, we talked about other libraries that are used for scheduling and executing deferrable background work. Firebase JobDispatcher
is one of the popular ones. If you have used Firebase JobDispatcher
, you might know it uses the JobService()
subclass as its entry point. In this recipe, we will look at how you can migrate to the newly recommended WorkManager
.
We will be looking at how we can migrate from JobService
to WorkerManager
. This might apply to your project or not. It is essential to cover it, though, due to the fact that WorkManager
is highly recommended, and we all have some legacy code. However, if your project is new, you can skip this recipe.
To migrate your Firebase JobDispatcher
to WorkManager
, follow these steps: