We wish to thank a lot of you in our dev community that have given us comments and logged bugs along the way – !

You can even track work status and retrieve work result using LiveData. This permits your UI.

If an device or application restart happens workManager is capable to reschedule your work, employing a listing of your work in its regional database.

Control over how your job is run

To Begin using the WorkManager API, add the WorkManager dependency available on Google’s Maven repository from Java or Kotlin for your program’s build.gradle file:

dependencies
We value your feedback, including features you like and attributes you would like to see.

WorkManager is ideal suited for jobs which may be deferred, but are still expected to run even when the program or device restarts (by way of example, syncing data periodically using a backend service and uploading logs or data info ).

dependencies
– Dinesh Shanmugam

dependencies
Take advantage of one-on-one scheduling using OneTimeWorkRequest or continuing scheduling with PeriodicWorkRequest.

Simplify how you manage background function with WorkManager

Today, we’re happy to announce the launch of Android Jetpack WorkManager 1.0 Stable. We wish to thank so many of you in our dev community that have given us comments and logged bugs along the way – !

We introduced a preview of this Android Jetpack WorkManager library in Google I/O 2018 and have since iterated on it with additional features and bug fixes thanks to a valuable input.

The aim of WorkManager would be to earn background operations easy for you. WorkManager takes into consideration limitations like battery-optimization, storage, or network accessibility, when the conditions are satisfied and its activities just run. It also knows when to retry or reschedule your work if program or your apparatus restarts.

WorkManager will leverage the right scheduling API under the hood: it uses JobScheduler API on Android 6.0+ (API 23+) plus a combination of AlarmManager and BroadcastReceiver on previous versions.

With WorkManager, you can add constraints like charging status or network availability. Your job will operate when the constraints are met and automatically retried if they fail while running. For example, if your job requires network to become accessible, the task will be stopped when network is accessible and retried.

Watch and read below to find out when and how to utilize WorkManager to simplify managing background work in your programs:

When to utilize WorkManager

If an application or device restart occurs workManager can also be able to reschedule your job, employing a record of your work in its regional database.

Control over how your work is conducted

You can chain your one-time work requests to conduct in parallel or in order. WorkManager attempts to ensure that work’s remaining chain will not run if any work in the chain fails. Read more about chaining work asks here.

You can even monitor work status and recover work outcome using LiveData. This allows your UI to be notified when your task is finished.

If you need more flexibility over how WorkManager parallelizes and handles work, check out our advanced threading guide.

For example, WorkManager will program desktop function through the maintenance window for Android 6.0+ (API 23+) apparatus once the system is in Doze mode.

Reliable scheduling

What programmers have to say