PeriodicWorkRequestKt

public final class PeriodicWorkRequestKt


Summary

Public methods

static final @NonNull PeriodicWorkRequest.Builder
<W extends ListenableWorker> PeriodicWorkRequestBuilder(
    long repeatInterval,
    @NonNull TimeUnit repeatIntervalTimeUnit
)

Creates a PeriodicWorkRequest.Builder with a given ListenableWorker.

static final @RequiresApi(value = "26") @NonNull PeriodicWorkRequest.Builder
<W extends ListenableWorker> PeriodicWorkRequestBuilder(
    @NonNull Duration repeatInterval
)

Creates a PeriodicWorkRequest.Builder with a given ListenableWorker.

static final @NonNull PeriodicWorkRequest.Builder
<W extends ListenableWorker> PeriodicWorkRequestBuilder(
    long repeatInterval,
    @NonNull TimeUnit repeatIntervalTimeUnit,
    long flexTimeInterval,
    @NonNull TimeUnit flexTimeIntervalUnit
)

Creates a PeriodicWorkRequest.Builder with a given ListenableWorker.

static final @RequiresApi(value = "26") @NonNull PeriodicWorkRequest.Builder
<W extends ListenableWorker> PeriodicWorkRequestBuilder(
    @NonNull Duration repeatInterval,
    @NonNull Duration flexTimeInterval
)

Creates a PeriodicWorkRequest.Builder with a given ListenableWorker.

Public methods

PeriodicWorkRequestBuilder

@NonNull
public static final PeriodicWorkRequest.Builder <W extends ListenableWorker> PeriodicWorkRequestBuilder(
    long repeatInterval,
    @NonNull TimeUnit repeatIntervalTimeUnit
)

Creates a PeriodicWorkRequest.Builder with a given ListenableWorker.

Parameters
long repeatInterval

@see androidx.work.PeriodicWorkRequest.Builder

@NonNull TimeUnit repeatIntervalTimeUnit

@see androidx.work.PeriodicWorkRequest.Builder

PeriodicWorkRequestBuilder

@RequiresApi(value = "26")
@NonNull
public static final @RequiresApi(value = "26") PeriodicWorkRequest.Builder <W extends ListenableWorker> PeriodicWorkRequestBuilder(
    @NonNull Duration repeatInterval
)

Creates a PeriodicWorkRequest.Builder with a given ListenableWorker.

PeriodicWorkRequestBuilder

@NonNull
public static final PeriodicWorkRequest.Builder <W extends ListenableWorker> PeriodicWorkRequestBuilder(
    long repeatInterval,
    @NonNull TimeUnit repeatIntervalTimeUnit,
    long flexTimeInterval,
    @NonNull TimeUnit flexTimeIntervalUnit
)

Creates a PeriodicWorkRequest.Builder with a given ListenableWorker.

Parameters
long repeatInterval

@see androidx.work.PeriodicWorkRequest.Builder

@NonNull TimeUnit repeatIntervalTimeUnit

@see androidx.work.PeriodicWorkRequest.Builder

long flexTimeInterval

@see androidx.work.PeriodicWorkRequest.Builder

@NonNull TimeUnit flexTimeIntervalUnit

@see androidx.work.PeriodicWorkRequest.Builder

PeriodicWorkRequestBuilder

@RequiresApi(value = "26")
@NonNull
public static final @RequiresApi(value = "26") PeriodicWorkRequest.Builder <W extends ListenableWorker> PeriodicWorkRequestBuilder(
    @NonNull Duration repeatInterval,
    @NonNull Duration flexTimeInterval
)

Creates a PeriodicWorkRequest.Builder with a given ListenableWorker.