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 26

The Alarm Service

Android devices maintain an internal alarm service that can be used to schedule jobs. Amazingly, as you will find out in this chapter, the API is very easy to use, seamlessly hiding the complexity of its lower-level code. This chapter explains how to use it and presents an example.

Overview

One of the built-in services available to all Android developers is the alarm service. With it you can schedule an action to take place at a later time. The operation can be programmed to be carried out once or repeatedly. The Clock application, for example, includes an alarm clock that relies on this service.

It is extremely easy to use. All you need is encapsulate the operation you intend to schedule in a PendingIntent and pass ...

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