Work Manager in Android: Dawood Ilyas
Work Manager in Android: Dawood Ilyas
ANDROID
WHAT IS IT?
Java:
WORK REQUEST:
ONETIMEWORKREQUEST
WORK REQUEST:
PERIODICWORKREQUEST
WORK CONSTRAINTS
WORK REQUEST
REAL POWER OF WORK
MANAGER: CHAINING
What if we wanted to filter multiple images, then compress them. and then upload
them. If you want to run a series of WorkRequests, one after the other or even in
parallel, you can use a chain.
The example diagram shows a chain where you have three filter tasks run in parallel,
followed by a compress task and an upload task, run in sequence:
CODE
Assuming you have created all your WorkRequests with the appropriate constraints, the
code looks like:
WORK INFO’S STATES
LIFE CYCLE OF WORK
TAGGING WORK
OBSERVING WORK
UNIQUE WORK
STOPPING A RUNNING TASK
REFERENCES
https://developer.android.com/topic/libraries/architecture/workmanage
https://medium.com/google-developer-experts/services-the-life-with-without-and-w
orker-6933111d62a6