I want to sync data to server after certain amount of time and this time is configurable ranging from 30 minutes to 8 hours.
I am using JobScheduler
to achieve above.
Is there any way using which I can update the JobInfo
associated with JobScheduler
?
So that I can update value set in setPeriodic(intervalMillis)
method to the updated time interval.
Refer my sample code below
SampleJobService.java
}
Remember to add your service in Manifest
Note that minimum interval is 15 minutes. Attempting to declare a smaller period that this when scheduling a job will result in a job that is still periodic, but will run with this effective period.