Change Background refresh time from 15 minutes to 1 day
This commit is contained in:
parent
d3972142f9
commit
4284123185
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Reference in a new issue