Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.


abstract class Worker : ListenableWorker

A class that performs work synchronously on a background thread provided by WorkManager.

Worker classes are instantiated at runtime by WorkManager and the doWork() method is called on a pre-specified background thread (see Configuration#getExecutor()). This method is for synchronous processing of your work, meaning that once you return from that method, the Worker is considered to be finished and will be destroyed. If you need to do your work asynchronously or call asynchronous APIs, you should use ListenableWorker.

In case the work is preempted for any reason, the same instance of Worker is not reused. This means that doWork() is called exactly once per Worker instance. A new Worker is created if a unit of work needs to be rerun.

A Worker is given a maximum of ten minutes to finish its execution and return a After this time has expired, the Worker will be signalled to stop.


Public constructors
<init>(@NonNull context: Context, @NonNull workerParams: WorkerParameters)

Public methods
abstract ListenableWorker.Result

Override this method to do your actual background processing.


Inherited functions

Public constructors


    @NonNull context: Context,
    @NonNull workerParams: WorkerParameters)

Public methods