Using Job Scheduler in Android API <21

Manny265 picture Manny265 · Feb 17, 2015 · Viewed 26.9k times · Source

I was looking at a scheduling tutorial by Vogella. It mentions the Job Scheduler API that was introduced in API 21 of Android. My question is can it be implemented in APIs lower than 21 (Lollipop) but not less than Android version 3 (Honeycomb)?

Answer

filipproch picture filipproch · May 29, 2015

from now on (after I/O 2015), you can also use new GcmNetworkManager. How to use it and how it works is described here - https://developers.google.com/cloud-messaging/network-manager

It does a lot cool stuff like it persists your tasks trough reboots. On Lolipop it uses JobScheduler, on pre-Lolipop it uses it's own implementation.

EDIT:

An example code on how to use it : https://github.com/jacktech24/gcmnetworkmanager-android-example