background library

Classes

BackgroundConstraints
Execution constraints that must be satisfied before a task runs.
BackgroundTask
Contract for a background task that can be scheduled and executed.
CacheCleanupTask
Clears expired JsonCache entries from SharedPreferences.
EmailQueueFlushTask
Flushes the Primekit email queue, delivering any messages that failed to send while the device was offline or the app was in the background.
NetworkSyncTask
Flushes the OfflineQueue when a network connection is available.
TaskConfig
Configuration for scheduling a single background task execution.
TaskFailure
Indicates a critical failure — the task should not be retried.
TaskRegistry
Global registry mapping BackgroundTask.taskId strings to factory functions used by WorkManager's top-level dispatch callback.
TaskResult
Sealed result type for background task execution outcomes.
TaskRetry
Indicates a transient failure — the scheduler may retry the task.
TaskScheduler
Stub TaskScheduler for platforms that do not support WorkManager.
TaskSuccess
Indicates successful task completion.

Enums

ExistingWorkPolicy
Controls what happens when a task with the same unique name is scheduled while an existing task with that name is already enqueued or running.
NetworkType
Network connectivity requirement for a background task.

Functions

callbackDispatcher() → void
Top-level callback stub for platforms that do not support WorkManager.