Background Task Scheduler
Component Detail
Infrastructure
medium complexity
mobile
1
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Registers and manages platform background execution tasks via the workmanager Flutter plugin, mapping to WorkManager (Android) and BGTaskScheduler (iOS). Schedules a periodic sync task with a minimum interval of 15 minutes so the outbox drains even when the app is not in the foreground.
background-task-scheduler
Responsibilities
- Register periodic background sync task with workmanager on app initialization
- Invoke SyncQueueService.drainOutbox() within the background task callback
- Handle task cancellation and re-registration on permission or platform state changes
- Respect platform-imposed minimum background execution intervals
Interfaces
registerPeriodicSync(intervalMinutes: int) -> Future<void>
cancelPeriodicSync() -> Future<void>
backgroundTaskCallback() -> Future<bool>
Relationships
Related Data Entities (1)
Data entities managed by this component