O'Reilly logo

Android™ Programming Unleashed by B.M. Harwani

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 13. Creating and Consuming Services

In This Chapter

Moving Tasks to Background Threads

Using the Handler Class

Using the AsyncTask Class

• Downloading and Displaying Images from the Internet

Consuming SOAP Services

Creating a Service

Creating a Bound Service

• Alarm Manager

• Sensor Manager

Performing tasks in the background increases application efficiency. One way to handle background processing is to use an Android service. A service is an application component that can perform long-running operations in the background and does not provide a user interface.

Moving Tasks to Background Threads

All Android application components such as activities, services, and broadcast receivers run in the main application thread. That ...

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