I am trying to use FirebaseJobDispatcher by following this
But My question is that, How to set time interval for the dispatcher object like GCMNetworkManager (setPeriod). Or please explain how FirebaseJobDispatcher works.
Only started working with the Dispatcher a day ago so I could be wrong. I think for what you want to do, you have to set your job as recurring and choose a fitting trigger.
final Job.Builder builder = dispatcher.newJobBuilder()
.setTag("myJob")
.setService(myJobService.class)
.setRecurring(true)
.setTrigger(Trigger.executionWindow(59, 61));
Would give you a job which repeats roughly every minute.
How to start the job and set up the Dispatcher in general I would recommend you to have a look at the testapp which is available at the FirebaseJobDispatcher git repository (which you already linked). Especially the classes JobFormActivity and DemoJobService.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With