Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

Worker.Result

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

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


The result of the Worker's computation that is returned in the Worker.doWork() method.

Summary

Enum values

Worker.Result  FAILURE

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

Worker.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)

Worker.Result  SUCCESS

Used to indicate that the work completed successfully. 

Public methods

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

Inherited methods

Enum values

FAILURE

public static final Worker.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 Worker.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 Worker.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 Worker.Result valueOf (String name)

Parameters
name String

Returns
Worker.Result

values

public static final Result[] values ()

Returns
Result[]