Skip to content
Permalink
Browse files

Issue #504: Fretboard: Require network for JobScheduler-based scheduler

Closes #504: Fretboard: Require network for JobScheduler-based scheduler
  • Loading branch information...
fercarcedo authored and pocmo committed Jul 25, 2018
1 parent 6248d52 commit 17630ffd5d8b64c2233a1f3f41f12f6ab73d1cf4
@@ -35,6 +35,7 @@ class JobSchedulerSyncScheduler(context: Context) {
fun schedule(jobId: Int, serviceName: ComponentName) {
val jobInfo = JobInfo.Builder(jobId, serviceName)
.setPeriodic(TimeUnit.DAYS.toMillis(1))
.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY)
.build()
jobScheduler.schedule(jobInfo)
}

0 comments on commit 17630ff

Please sign in to comment.
You can’t perform that action at this time.