December 2013
Beginner
320 pages
7h 54m
English
Services are one of the most important, and most often under-utilized, components of the Android platform. They are essential for accomplishing any task whose data or relevance can span more than one activity. They are like activities in that they have a lifecycle (albeit a much simpler one), but they do not have the activity’s ability to draw to the screen. In practice, services break down into two major use cases: the listener and the task. Listeners are services that hang out in the background, waiting for something to happen that prompts them to take action. Task services are akin to the photo downloader that we covered before, so in this chapter I’ll focus on listening services.
A Service ...