

WorkManager takes care of ensuring that this work persists and is rescheduled Scheduled work is stored in an internally managed SQLite database and Work can be tagged and namedĪs well, allowing you to schedule unique, replaceable work and monitor or cancel Repeatedly using flexible scheduling windows. WorkManager allows you to schedule work to run one-time or Network, when the device is idle, or when it has sufficient battery.

For example, run only when the device is on an unmetered Number of other key benefits: Work constraintsĭeclaratively define the optimal conditions for your work to run using workĬonstraints. In addition to providing a simpler and more consistent API, WorkManager has a

TASK COACH WANTING TO ACCESS INTERNET HOW TO
Call setForeground() in the Worker to handle the notification.įor more information regarding how to set up WorkManager, see the Defining your Typeįor expedited work, call setExpedited() on your OneTimeWorkRequest.Īny WorkRequest or Worker. Similarly, the following table outlines the various types of work.
