Apps in the Background
summary
Mobile apps get about five seconds to finish willEnterBackground work unless they call beginBackgroundTask with an expiration handler, and UIKit returns an ID that must be ended or the process gets killed (watch for watchdog codes like CPU overuse and bad 0x2). Use background URLSession (launches = true) and notification service extensions for heavy work, name and centralize background tasks into a background task manager, run off the main thread, make tasks cancelable β this approach cuts Wireβs background CPU time by more than five hours per week.
AI-written summary Β· about
chapters (7)
- 0:00Introduction to background apps
- 2:52Background lifecycle
- 7:25Responding to background events
- 9:34Identifying background issues
- 13:45Optimizing with background tasks
- 21:33Architecting for background use
- 27:01Conclusion and recap
related talks
11mEffective background tasks on Android
39mModern best practices for background task execution
28mBest practices for running background work on Android
36mBackground Work in Android: Strategies and Best Practices
41mBackground Processing with Flutter and Native Platforms
37mA guide to using foreground services and background work in Android 14
39mWorkout your tasks with WorkManager
31mAndroid Jetpack: Easy background processing with WorkManager
