A guide to using foreground services and background work in Android 14
summary
Android 14 requires apps targeting it to declare mandatory foreground service types in the manifest or the app crashes at runtime; libraries must include them too. New types include short service 3 minutes (finish critical work without extra permissions) and use-case types like health and remote messaging; Play Console will soon require justification, a description, and a demo video. Use WorkManager with an expedited flag for deferred or retryable work, test the restricted standby bucket with ADB, and prefer new alternatives (user-initiated transfer, companion device manager) over foreground services when possible.
AI-written summary · about
chapters (13)
- 0:00Introduction and setup
- 2:32Background work basics
- 8:30Foreground services explained
- 11:59Android 14 foreground service types
- 15:09Declaring service types in manifest
- 18:46WorkManager setForeground API
- 20:54Play Console declarations
- 21:58Alternative APIs overview
- 24:06Choosing the right API
- 28:40User-initiated action scenarios
- 31:08Interactive quiz
- 33:57Future of background APIs
- 35:21Recap and closing
related talks
38mGuide to Foreground Services on Android
38mGuide to Foreground Services
36mBackground Work in Android: Strategies and Best Practices
28mBest practices for running background work on Android
11mEffective background tasks on Android
50mWTF with Android Background Restrictions
45mWorking background with WorkManager API
37mOperating Notes with a Foreground Service: How a Hiking App Faced Constraints
