# Interface ForegroundService.Task

Enclosing class:
  `ForegroundService`

public static interface ForegroundService.Task
The long running task executed by a foreground service.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `run(ForegroundService service)`
  Runs the work.

- ## Method Details

  - ### run

    void run(ForegroundService service)

    Runs the work. The accompanying notification remains visible until this method returns or `ForegroundService#stop()` is called.

    ###### Parameters

    - `service`: the running service, used to update the notification or stop early