Job Scheduler not running within set interval

前端 未结 6 905
离开以前
离开以前 2020-12-09 19:59

I\'m trying to use the android Job Scheduler API and all I\'m trying to do is have the Job Scheduler run every 5 seconds. However when I run it, the corresponding service is

6条回答
  •  遥遥无期
    2020-12-09 20:32

    Instead of setPeriodic(int) use setMinimumLatency(int) with setOverrideDeadline(int). These two methods will adjust the interval of your JobScheduler.

提交回复
热议问题