O'Reilly logo

Beginning Android 3 by Mark Murphy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 36. Basic Service Patterns

Now that you have seen the pieces that make up services and their clients, let us examine a few scenarios that employ services and how those scenarios might be implemented.

The Downloader

If you elect to download something from the Android Market, you are welcome to back out of the Market application entirely. This does not cancel the download - the download and installation run to completion, despite no Market activity being on-screen.

You may have similar circumstances in your application, from downloading a purchased e-book to downloading a map for a game to downloading a file from some sort of "drop box" file-sharing service.

Android 2.3 introduced the DownloadManager (covered in a previous chapter), which would ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required