-1

I was learning about JobScheduler with a Tutorial from 2015, and when I was creating a class of this service,it complains asking me to put the annotation @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP), which means, doesn't work for old versions? And if it is, GCMNetworkManager would be the one ?

Nathiel Barros
  • 685
  • 2
  • 11
  • 25

1 Answers1

0

which means, doesn't work for old versions?

Yes annotation specifies that API wont work under LOLLIPOP version

And if it is, GCMNetworkManager would be the one ?

Alternatives to JobScheduler are

  • AlarmManager
  • GCMNetworkManager
  • SyncAdapter

You should choose one that suits your need with minimal device resource utilisation.

Note: Avoid using services that run perpetually or perform periodic work, since they continue to use device resources even when they are not performing useful tasks.

Mani
  • 2,599
  • 4
  • 30
  • 49