The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.


JobScheduler

AlarmManager was our original solution for doing work on a periodic basis. However, AlarmManager can readily be misused, in ways that impact the battery — this is why API Level 19 put renewed emphasis on “inexact” alarm schedules. Worse, AlarmManager will give us control at points in time that may be useless to us, such as giving us control when there is no Internet access, when the point of the scheduled work is to transfer some data over the Internet.

Android 5.0 introduced JobScheduler, which offers a more sophisticated API for handling these sorts of scenarios. This chapter will explore how to set up JobScheduler and use it for one-off and periodic work.

Prerequisites

Understanding this chapter requires that you have read the core chapters, particularly the chapter on AlarmManager. Also, you should have read the chapter on PowerManager and wakelocks.

The Limitations of AlarmManager

The preview of this section is off trying to sweet-talk the Khaleesi into providing us with a dragon.

Enter the JobScheduler

The preview of this section took that left turn at Albuquerque.

Employing JobScheduler

The preview of this section took that left turn at Albuquerque.

Pondering Backoff Criteria

The preview of this section was accidentally identified as an Android 'tasty treat' by the Cookie Monster.

Other JobScheduler Features

The preview of this section is en route to Mars.

JobScheduler Period Limits

The preview of this section was abducted by space aliens.

GcmNetworkManager

The preview of this section is sleeping in.

Periodic Work, Across Device Versions

The preview of this section is [REDACTED].

Android 6.0 and “the War on Background Processing”

The preview of this section is en route to Mars.

Scheduling Content Monitoring

The preview of this section was last seen in the Bermuda Triangle.