lightbulb_outline Please take our October 2018 developer survey. Start survey

ListenableWorker.Result

public static final enum ListenableWorker.Result
extends Enum<ListenableWorker.Result>

java.lang.Object
   ↳ java.lang.Enum<androidx.work.ListenableWorker.Result>
     ↳ androidx.work.ListenableWorker.Result


The result of the Worker's computation.

Summary

Enum values

ListenableWorker.Result  FAILURE

Used to indicate that the work completed with a permanent failure. 

ListenableWorker.Result  RETRY

Used to indicate that the work encountered a transient failure and should be retried with backoff specified in WorkRequest.Builder.setBackoffCriteria(BackoffPolicy, long, TimeUnit)

ListenableWorker.Result  SUCCESS

Used to indicate that the work completed successfully. 

Public methods

static ListenableWorker.Result valueOf(String name)
static final Result[] values()

Inherited methods

Enum values

FAILURE

public static final ListenableWorker.Result FAILURE

Used to indicate that the work completed with a permanent failure. Any work that depends on this will also be marked as failed and will not be run.

RETRY

public static final ListenableWorker.Result RETRY

Used to indicate that the work encountered a transient failure and should be retried with backoff specified in WorkRequest.Builder.setBackoffCriteria(BackoffPolicy, long, TimeUnit).

SUCCESS

public static final ListenableWorker.Result SUCCESS

Used to indicate that the work completed successfully. Any work that depends on this can be executed as long as all of its other dependencies and constraints are met.

Public methods

valueOf

public static ListenableWorker.Result valueOf (String name)

Parameters
name String

Returns
ListenableWorker.Result

values

public static final Result[] values ()

Returns
Result[]