Created
March 10, 2019 14:30
-
-
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.
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
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