|Modifier and Type||Class and Description|
|Modifier and Type||Method and Description|
Cancels anything that was previously scheduled, or else does nothing.
Schedules a service to be started in the foreground when some
public WorkManagerScheduler(String workName)
public boolean schedule(Requirements requirements, String servicePackage, String serviceAction)
Requirementsare met. Anything that was previously scheduled will be canceled.
The service to be started must be declared in the manifest of
servicePackage with an
intent filter containing
serviceAction. Note that when started with
serviceAction, the service must call
Service.startForeground(int, Notification) to
make itself a foreground service, as documented by