Use SetMinimumLatency(long) instead of setPeriodic

This commit is contained in:
jacques 2020-09-27 19:15:13 +02:00
parent 24e4d35696
commit d6075e76e3

View file

@ -388,13 +388,13 @@ public class MedicamentListActivity extends AppCompatActivity {
if (today.before(dateAtNoon(today))) {
info = new JobInfo.Builder(24560, componentName)
.setPersisted(true)
.setPeriodic(dateAtNoon(today).getTime())
.setMinimumLatency(dateAtNoon(today).getTime())
.build();
scheduleDate = today;
} else {
info = new JobInfo.Builder(24560, componentName)
.setPersisted(true)
.setPeriodic(dateAtNoon(tomorrow).getTime())
.setMinimumLatency(dateAtNoon(tomorrow).getTime())
.build();
scheduleDate = tomorrow;
}