~/talk

Guide to Foreground Services on Android

Talkat droidcon London 2025 · 2025-10-30..10-31· [android]
slides:none on file

Step-by-step guide to implement and harden Android foreground services including manifest entries, runtime permissions, and startForeground timing rules with concrete exceptions developers will see like ForegroundServiceStartNotAllowedException and missing foreground service type exception; lists mandatory runtime prerequisites per type and Play Console declaration requirements for Android 14+, shows sample app demonstrating location foreground service, binding and WorkManager’s long‑running worker backed by a system foreground service, and calls out time limits such as short service 3 minutes and data sync/media processing 6 hours per 24h.

AI-written summary · about

  1. 0:00Introduction
  2. 3:10What is a foreground service
  3. 7:02Foreground service types
  4. 11:20When to start a foreground service
  5. 13:30Notification requirements
  6. 15:15Play Console declaration
  7. 16:44Should you use a foreground service
  8. 19:34Time limits and restrictions
  9. 20:57Starting from background events
  10. 22:46Two ways to create
  11. 23:07Traditional implementation steps
  12. 26:14Elevating to foreground service
  13. 28:42Starting correctly
  14. 31:32WorkManager for long tasks
  15. 35:23Sample app demo
  16. 36:05Key takeaways
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.