class) give you a way to perform time-based operations outside the lifetime of your application.
For example, you could use an alarm to initiate a long-running operation, such as starting a service once a day to download a weather forecast. This approach gives Android better control over system resources.
A repeating alarm is a relatively simple mechanism with limited flexibility.
See the linked videos at the top of this page for a detailed discussion of when and how to use GCM and sync adapter.
Every choice you make in designing your repeating alarm can have consequences in how your app uses (or abuses) system resources.
For example, imagine a popular app that syncs with a server.
If the sync operation is based on clock time and every instance of the app syncs at p.m., the load on the server could result in high latency or even "denial of service." Follow these best practices in using alarms: One of the first considerations in using a repeating alarm is what its type should be.
There are two general clock types for alarms: "elapsed real time" and "real time clock" (RTC).