Skip to content

Instantly share code, notes, and snippets.

@aruke
Created March 10, 2019 14:30
Show Gist options
  • Save aruke/75bf2b7a4634aa2d65dd13540e7e60f5 to your computer and use it in GitHub Desktop.
Save aruke/75bf2b7a4634aa2d65dd13540e7e60f5 to your computer and use it in GitHub Desktop.
Gists to embed in WorkManager blog. Full code is available at https://github.com/aruke/WorkManagerDemo.
val inputData: Data = Data.Builder().putInt(SimpleWorker.KEY_DELAY, 5).build()
val simpleWorkRequest = OneTimeWorkRequest.Builder(SimpleWorker::class.java)
.setInputData(inputData)
.build()
WorkManager.getInstance().enqueue(simpleWorkRequest)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment