Android WorkManager — Introduction
What is all about Workmanager…
What is WorkManager:
WorkManager is basically an AndroidJetPack architecture component and It is used to scheduling background task. The task to run ’s immediately or at an appropriate time.
Now you might ask why work manager? as we had the options for scheduling task using job-scheduler, firebase-job-scheduler or alarm-manager, but these methods were so complicated & the main issue was we had to find the device version and for that reason, it will make the code lengthy, but with work-manager, we don’t need to worry about the device capability.
- It provides us the clean interface, no more complex coding.
- The work-manager give us the guarantee for the execution.
The Basic Classes Of Work-Manager:
- Worker: The work needs to be defined here.
- WorkRequest: It defines a work, like which worker class is going to be executed.
- WorkManager: It enqueues and managers the work request.
- WorkInfo: It contains information about the work.
That’s it so far for the Introduction, In the next article, we will learn about the oneTimeWorkRequest.
Sharing the knowledge is Caring :-)
Thanks for reading this article. Be sure to clap to recommend this article if you found it helpful. It means a lot to me.
If you need any help then Join me on Twitter, Linkedin, Github, and Subscribe to my Youtube Channel.