Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.

CoroutineWorker

abstract class CoroutineWorker : ListenableWorker
kotlin.Any
   ↳ androidx.work.ListenableWorker
   ↳ androidx.work.CoroutineWorker

A ListenableWorker implementation that provides interop with Kotlin Coroutines. Override the doWork function to do your suspending work.

Summary

Public constructors
<init>(appContext: Context, params: WorkerParameters)

A ListenableWorker implementation that provides interop with Kotlin Coroutines.

Public methods
abstract suspend ListenableWorker.Result

A suspending method to do your work.

open suspend ForegroundInfo

ListenableFuture<ForegroundInfo>

Unit

suspend Unit
setForeground(foregroundInfo: ForegroundInfo)

Makes the CoroutineWorker run in the context of a foreground android.app.Service.

suspend Unit

Updates the progress for the CoroutineWorker.

ListenableFuture<ListenableWorker.Result>

Inherited functions
Properties
open CoroutineDispatcher

The coroutine context on which doWork will run.

Public constructors

<init>

CoroutineWorker(
    appContext: Context,
    params: WorkerParameters)

A ListenableWorker implementation that provides interop w