Skip to content

Android behavior

Android scheduling is backed by WorkManager. No extra app manifest entry is required for normal periodic background fetch work.

await BackgroundTask.registerTaskAsync('sync-offline-data', {
minimumInterval: 30,
requiresNetwork: true,
});
  • Android enforces a 15 minute minimum interval for periodic work.
  • requiresNetwork: true maps to WorkManager’s connected network constraint.
  • Each task name is scheduled as unique periodic work, so registering the same task name updates the existing schedule.
  • Task runs are recorded natively before being delivered to JavaScript, so pending events can be drained when the WebView is ready.

Use the test trigger to execute registered callbacks immediately during development:

await BackgroundTask.triggerTaskWorkerForTestingAsync();

WorkManager is designed for deferrable work. It does not guarantee exact timing and should not be used for alarms, countdowns, or user-visible deadlines.