© Peter Späth 2018
Peter SpäthPro Android with Kotlinhttps://doi.org/10.1007/978-1-4842-3820-2_4

4. Services

Peter Späth1 
(1)
Leipzig, Germany
 

Services are components running without a user interface and with a conceptual affinity toward long-running processes. They are separate from notifications in the status bar or a Toast. Services can be started by apps, or they can be bound to by apps, or both.

Services come in two flavors: foreground services and background services. While at first glance it seems to be a contradiction to speak of “foreground” services since so many people tend to say that “services run in the background,” foreground services do actually exist. The distinction between foreground and background services is crucial because their ...

Get Pro Android with Kotlin: Developing Modern Mobile Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.