Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
Description
I've got a work request that I want to run with certain (perhaps multiple) constraints--battery, network etc. If I queue the work and see it in the `State.ENQUEUED` / `State.BLOCKED` state then I have no way of knowing which of the constraints is blocking execution and so cannot surface to users what they need to do (e.g. connect to network) to get the work to run ("Waiting for Wifi...").
It will be really great if `getWorkInfosByTagLiveData` and `getWorkInfosByTag` could return a `WorkInfo` that includes information about which constraints are/aren't satisfied so that we can surface this information to users. Attempting to implement this ourself by storing the constraints applied and querying network status, battery status etc is hard to do and can only ever be a best-guess at why WorkManager is actually blocking (it becomes very complex when dealing with failed work that is backing off, work with constraints, etc)