Since my App has to be available for Android versions 4.x I cannot rely solely on the JobScheduler for background activity. The Firebase JobDispatcher is backwards compatible with the versions I need, so I tested it a bit.
My expectation was, that its using Google Play Services when on Android <5 and the JobScheduler API when 5+, as seen on this slide from the Android battery and memory optimizations talk on Google I/O 2016.
Jobs which I schedule in my own app using the JobDispatcher and the testapp, which comes with the Firebase JobDispatcher, do work. I don't see any activity when calling adb shell dumpsys jobscheduler
. When I am using the JobScheduler directly I can see the jobs there without a problem.
So I guess the slide I linked above is wrong? Is it possible to let the JobDispatcher use the JobScheduler when on Android 5+? Maybe with a custom driver?