TaskRequest
Describes a background task to be scheduled.
Parameters
Unique identifier for the task. Used for registration, cancellation, and observation.
Whether this is a TaskType.OneTime or TaskType.Periodic task.
Platform constraints that must be satisfied before execution.
How the task should be retried on failure.
Execution priority hint. See TaskPriority.
Optional set of string labels for group cancellation or filtering.
Optional serialized data passed to the task handler via TaskExecutionContext.payload.
Optional human-readable display name for this task (used in logs and future foreground-service notifications). Defaults to id if not set.
Optional maximum duration this task is allowed to run before being timed out.
Constructors
Properties
Functions
Encodes data as JSON and attaches it as the payload for this TaskRequest.