ListenableWorker.Result

public static abstract class ListenableWorker.Result
extends Object

java.lang.Object
   ↳ androidx.work.ListenableWorker.Result


The result of a ListenableWorker's computation. Call success(), failure(), or retry() or one of their variants to generate an object indicating what happened in your background work.

Summary

Public methods

static ListenableWorker.Result failure()

Returns an instance of ListenableWorker.Result that can be used to indicate that the work completed with a permanent failure.

static ListenableWorker.Result failure(Data outputData)

Returns an instance of ListenableWorker.Result that can be used to indicate that the work completed with a permanent failure.

abstract Data getOutputData()
static ListenableWorker.Result retry()

Returns an instance of ListenableWorker.Result that can be used to indicate that the work encountered a transient failure and should be retried with backoff specified in WorkRequest.Builder.setBackoffCriteria(BackoffPolicy, long, TimeUnit).

static ListenableWorker.Result success()

Returns an instance of ListenableWorker.Result that can be used to indicate that the work completed successfully.

static ListenableWorker.Result success(Data outputData)

Returns an instance of ListenableWorker.Result that can be used to indicate that the work completed successfully.

Inherited methods