ForegroundUpdater
interface ForegroundUpdater
androidx.work.ForegroundUpdater |
Manages updating android.app.Notification
s when a ListenableWorker
transitions to running in the context of a foreground android.app.Service
.
Summary
Public methods | |
---|---|
abstract ListenableFuture<Void!> |
setForegroundAsync(@NonNull context: Context, @NonNull id: UUID, @NonNull foregroundInfo: ForegroundInfo) |
Public methods
setForegroundAsync
@NonNull abstract fun setForegroundAsync(
@NonNull context: Context,
@NonNull id: UUID,
@NonNull foregroundInfo: ForegroundInfo
): ListenableFuture<Void!>
Parameters | |
---|---|
context |
Context: The application Context . |
id |
UUID: The UUID identifying the ListenableWorker |
foregroundInfo |
ForegroundInfo: The ForegroundInfo |
Return | |
---|---|
ListenableFuture<Void!> |
@return The ListenableFuture which resolves after the ListenableWorker transitions to running in the context of a foreground android.app.Service . |