For an additional challenge, create a second implementation of PollService that subclasses JobService and is run using JobScheduler. In your PollService startup code, check to see whether you are on Lollipop. If so, use JobScheduler to schedule your JobService. Otherwise, fall back on your old AlarmManager implementation.