PeriodicWorkRequestKt

Added in 1.0.0

public final class PeriodicWorkRequestKt


Summary

Public methods

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

Creates a PeriodicWorkRequest.Builder with a given ListenableWorker.

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

Creates a PeriodicWorkRequest.Builder with a given ListenableWorker.

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

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.

Public methods

PeriodicWorkRequestBuilder

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

Creates a PeriodicWorkRequest.Builder with a given ListenableWorker.

PeriodicWorkRequestBuilder

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

Creates a PeriodicWorkRequest.Builder with a given ListenableWorker.

PeriodicWorkRequestBuilder

public static final @NonNull 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

public 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.

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