public interface ForegroundService.Task

The long running task executed by a foreground service.

Methods

public abstract void run(ForegroundService service)Runs the work.

Method details

run

public abstract void run(ForegroundService service)
Runs the work. The accompanying notification remains visible until this method returns or ForegroundService#stop() is called.

Parameters

service ForegroundService
the running service, used to update the notification or stop early