Created
January 19, 2017 20:46
-
-
Save brendan-fahy/8f6ef7f6366c43f050bef858b5dedfba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun jobInfo(context: Context): JobInfo { | |
val serviceName = ComponentName(context, PowerService::class.java) | |
return JobInfo.Builder(JOB_ID, serviceName) | |
.setRequiredNetworkType(JobInfo.NETWORK_TYPE_NONE) | |
.setRequiresCharging(true) | |
.setPeriodic(JOB_INTERVAL) | |
.build() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment