Native Background Processing with Flutter
summary
Shows how a wearable-backed Flutter app keeps syncing off-screen by launching a separate Flutter engine from a native foreground service, communicating over method channels and an engine group cache entry point (backgroundMain). Demonstrates using Dart isolates for heavy JSON decoding, WorkManager/background_fetch for resilient jobs, and a real case uploading multi-GB payloads. Built a native BLE-backed foreground service that worked but initially caused severe battery drain until timers, sockets and DB writes were throttled and lifecycle handling was corrected.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 2:13Background processing challenges
- 6:08Use cases
- 8:59Dart isolates misconceptions
- 11:54Demo overview and native interop
- 13:21Foreground service implementation
- 17:35Live background processing demo
- 19:19Recommended plugins
- 20:01Native vs Dart for background tasks
- 22:33Android background options
- 24:16BLE and foreground service rationale
- 25:59iOS background limitations
- 27:25iOS background scheduler tricks
- 29:09Battery drain fixes
- 30:52Android companion pairing
- 31:12Final remarks
related talks
34mCustom Entrypoints for Smarter Background Processing
32mHeavy lift work in Flutter get started with Isolates
15mWhen, why, and how to multithread in Flutter
31mAndroid Jetpack: Easy background processing with WorkManager
42mKotlin Multiplatform multithreading old and new way
30mExtra! Extra! Thread all about it!
23mLook Ma, No Background Jobs: A Peek into the Async Future
37mNative Concurrency and Coroutines
