Job myJob = dispatcher.newJobBuilder()
// the JobService that will be called
.setService(MyJobService.class)
// uniquely identifies the job
.setTag("my-unique-tag")
// one-off job
.setRecurring(true)
// don't persist past a device reboot
.setLifetime(Lifetime.FOREVER)
// start between 0 and 60 seconds from now
.setTrigger(Trigger.executionWindow(0, 60))
// don't overwrite an existing job with the same tag
.setReplaceCurrent(false)
// retry with exponential backoff
.setRetryStrategy(RetryStrategy.DEFAULT_LINEAR)
// constraints that need to be satisfied for the job to run
// .setConstraints(
// // only run on an unmetered network
// Constraint.ON_UNMETERED_NETWORK,
// // only run when the device is charging
// Constraint.DEVICE_CHARGING
// )
.setExtras(myExtrasBundle)
.build();
dispatcher.mustSchedule(myJob);
I am trying to use firebase jobdispatcher to support older devices and newer devices for my calendar app, i am referring this link to setup firebase code in my app is there anything needed to schedule job at particular time at daily weekly etc. or there any other alternative for that? need help in trigger window setting to schedule event at particular time and date recursively. eg daily 4 pm event for 1 week