Change Background refresh time from 15 minutes to 1 day

This commit is contained in:
Mylloon 2021-09-04 21:14:36 +02:00
parent d3972142f9
commit 4284123185

View file

@ -60,7 +60,7 @@ fun newJob(context: Context) {
val myConstraints = Constraints.Builder()
.setRequiredNetworkType(NetworkType.CONNECTED) //checks whether device should have Network Connection
.build()
val job = PeriodicWorkRequestBuilder<BackgroundUpdateCheck>(15, TimeUnit.MINUTES)
val job = PeriodicWorkRequestBuilder<BackgroundUpdateCheck>(1, TimeUnit.DAYS)
.setConstraints(myConstraints)
.build()
WorkManager.getInstance(context).enqueue(job)