Skip to content

Workmanager

Devrath edited this page Jun 5, 2021 · 15 revisions

Definition

  • Work-Manager is a new library from android architecture components
  • It simplifies the work of getting the background tasks done, even if the application gets killed. This is very hard to achieve in the latest android versions using the old android API's.

Work manager as an assistant

  • Work-Manager is a clever mobile assistant that helps to perform heavy tasks in the background thread.
  • It is in such a way that, we have certain tasks to complete, we hand over the tasks to the assistant stating the conditions in with the task has to be done. And finally, the assistant takes care of the task getting done.
  • For example, You can tell the assistant work-manager to perform a task every one hour, not to start the work until the device has network, `not to start the work until the battery is low.
  • Work-manager continues the work even if the app is in the background or the OS kills the app.
  • Summarizing the work-manager could intelligently use the defined factors and get the work done for you.

Work manager's Arsenal

* The beauty of work manager is that, Under the hood based on the requirement, the work manager decides which API's to execute and get the task done. * So we ask `work-manager` on what need to be done and not worrying on how it will be done

Clone this wiki locally