How to call setForegroundAsync for a chain of workers

117 Views Asked by At

I'm migrating some legacy code, that used to be executed with a ForegroundService, to be executed using WorkManager. I have 3 workers that I set to execute sequentially. What I can't understand is how to set the foreground notification when I have separate workers. What if I have parallel worker execution by using continuation? Do I call setForegroundAsync for each worker? I really need clarification on this.

0

There are 0 best solutions below