Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

OneTimeWorkRequest

public final class OneTimeWorkRequest
extends WorkRequest

java.lang.Object
   ↳ androidx.work.WorkRequest
     ↳ androidx.work.OneTimeWorkRequest


A WorkRequest for non-repeating work.

OneTimeWorkRequests can be put in simple or complex graphs of work by using methods like WorkManager.beginWith(OneTimeWorkRequest) or WorkManager.beginWith(List).

Summary

Nested classes

class OneTimeWorkRequest.Builder

Builder for OneTimeWorkRequests. 

Inherited constants

Public methods

static List<OneTimeWorkRequest> from(List<Class<? extends ListenableWorker>> workerClasses)

Creates a list of OneTimeWorkRequests with defaults from an array of ListenableWorker class names.

static OneTimeWorkRequest from(Class<? extends ListenableWorker> workerClass)

Creates a OneTimeWorkRequest with defaults from a ListenableWorker class name.

Inherited methods

Public methods

from

public static List<OneTimeWorkRequest> from (List<Class<? extends ListenableWorker>> workerClasses)

Creates a list of OneTimeWorkRequests with defaults from an array of ListenableWorker class names.

Parameters
workerClasses List: A list of ListenableWorker class names

Returns
List<OneTimeWorkRequest> A list of OneTimeWorkRequest constructed by using defaults in the OneTimeWorkRequest.Builder

from

public static OneTimeWorkRequest from (Class<? extends ListenableWorker> workerClass)

Creates a OneTimeWorkRequest with defaults from a ListenableWorker class name.

Parameters
workerClass Class: An ListenableWorker class name

Returns
OneTimeWorkRequest A OneTimeWorkRequest constructed by using defaults in the OneTimeWorkRequest.Builder