O'Reilly logo

Android Application Development: A Beginner’s Tutorial by Budi Kurniawan

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 24

Services

So far in this book, everything you have learned is related to activities. It is now time to present another Android component, the service. A service has no user interface and runs in the background. It is suitable for long-running operations. This chapter explains how to create a service and provides an example.

Overview

As already mentioned, a service is a component that perform a long running operation in the background. A service will continue to run even after the application that started it has been stopped. A service runs on the same process as the application in which the service is declared and in the application’s main thread. As such, if a service takes a long time to complete, it should run on a separate thread. ...

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