Friday, June 1, 2018

Episode 93: WorkManager

Tor, Sumir, Tor, Chet, a spiral notebook (blank), and Tor
In this episode, Chet and Tor talk with Sumir Kataria about the new WorkManager library that was announced at Google I/O (and released in early form). WorkManager makes it easier to schedule asynchronous work at a more appropriate time using a fluent, chainable API. Think of it as JobScheduler (in fact it uses JobScheduler internally when present), but handling situations and devices that don't have a recent enough version of the OS to have the JobScheduler API available.
Go get WorkManager and try it out - we'd love to get feedback on it as we iterate toward 1.0.

Subscribe to the podcast feed or download the audio file directly.

I/O Video: Easy background processing with WorkManager
Article: Schedule tasks with WorkManager
Reference docs

Sumir: @SumirKodes

Thanks to continued tolerance and support by our audio engineer, Bryan Gordon.

1 comment:

  1. Where can I ask questions about it?
    For example, I got these questions:
    1. Will the Worker be persistant over OS restart? Is it possible to turn it off/on ?
    2. On other APIs of Google, it was possible to set a time window for the schedule ("setExecutionWindow" in GcmTaskService). Where is it now?
    3. How can I update current Worker? Cancel by its id/tag, and use a new one?
    4. Is it possible to get a scheduled Worker parameters? This is important if we wish to reschedule it...
    5. Is it possible to set a deadline? This means that if the Worker didn't have a chance to fit into the constraints within a certain amount of time, it will be cancelled.
    6. Is it possible to cancel a Worker, including interrupting its thread? This is important in the case of a thread there that runs for some time, yet it can be interrupted.