.NET MAUI › Device Features & Essentials
How do you run background work or scheduled tasks in MAUI?
AdvancedAnswer
MAUI has no unified background API; use platform mechanisms: Android WorkManager/foreground services, iOS BGTaskScheduler/background modes, and Windows background tasks—wrapped behind a shared interface. For short async work while active, normal tasks suffice; true background execution needs native scheduling per platform.
public interface IBackgroundSync { void Schedule(TimeSpan interval); }
// Platforms/Android -> WorkManager; Platforms/iOS -> BGTaskSchedulerReal-world example A messaging app schedules periodic sync via WorkManager on Android and BGTaskScheduler on iOS behind one IBackgroundSync interface.