Chuyển đến nội dung chính

Bài đăng

Hiển thị các bài đăng có nhãn Background

Background work in Flutter: what the OS will actually let you run

“Sync the user’s data every fifteen minutes” sounds like a scheduling problem. It is really a negotiation with two operating systems that have spent a decade getting better at saying no. Before choosing a package, it is worth being precise about what each platform actually offers, because the gap between them determines what your feature can promise. What you are actually allowed Capability Android iOS Periodic background work Yes, minimum ~15 minutes, subject to Doze BGAppRefreshTask — the system decides when, possibly never One-off deferred work Yes, with constraints BGProcessingTask , typically overnight while charging Guaranteed execution while app is closed Only via a foreground service with a visible notification No Long-running work (minutes) Foreground service No — a background task gets seconds, then is suspended Triggered by a server Yes, high-priority FCM Limited; silent pushes are throttled The row that changes designs is the third. O...