BackoffPolicy
class BackoffPolicy
kotlin.Any | ||
↳ | kotlin.Enum<androidx.work.BackoffPolicy> | |
↳ | androidx.work.BackoffPolicy |
An enumeration of backoff policies when retrying work. These policies are used when you have a return ListenableWorker.Result#retry()
from a worker to determine the correct backoff time. Backoff policies are set in WorkRequest.Builder#setBackoffCriteria(BackoffPolicy, long, TimeUnit)
or one of its variants.
Summary
Enum values | |
---|---|
Used to indicate that |
|
Used to indicate that |
Enum values
EXPONENTIAL
enum val EXPONENTIAL : BackoffPolicy
Used to indicate that WorkManager
should increase the backoff time exponentially
LINEAR
enum val LINEAR : BackoffPolicy
Used to indicate that WorkManager
should increase the backoff time linearly