Working with WorkManager
summary
WorkManager explains concrete APIs and guarantees: it wraps JobScheduler/AlarmManager, supports API 14+, and has had 11 releases since I/O with beta imminent. It stores work and dependencies in a local database, exposes lifecycle states (enqueued, running, succeeded/failed/cancelled), and supports chaining, unique work with keep/replace/append policies, and periodic work semantics. Async work uses ListenableWorker and ResolvableFuture/ListenableFuture so callbacks run off-thread; customization uses a WorkerFactory and a custom Configuration that replaces the default initializer.
AI-written summary · about
chapters (21)
- 0:00Intro
- 0:32Overview
- 0:55State of the Union
- 6:50Chaining
- 9:33Signalling async work completion
- 10:55Worker is a simple Listenable Worker
- 14:28Operations
- 15:26When is work stopped?
- 15:59How do we stop work?
- 16:51Polling for stoppages
- 19:20Life of One Time Work
- 20:22Life of Periodic Work
- 21:15Life of a Chain of Work
- 22:23What's wrong with this code?
- 23:10Unique work syntax
- 23:32Existing WorkPolicy
- 24:43WorkManager Configuration
- 25:27Setting a custom Configuration
- 26:35Advice for library developers
- 28:04Get WorkManager
- 28:25Helpful links



