Created
July 4, 2019 19:00
-
-
Save magdamiu/497d032696ca2f2e75fc94a236cdeeec to your computer and use it in GitHub Desktop.
Input and output data for a task
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 userIdData = Data.Builder() | |
.putInt(DATA_USER_ID, userId) | |
.build() | |
val syncOnlyOnce = OneTimeWorkRequestBuilder<SyncWorker>() | |
.setInputData(userIdData) | |
.build() | |
val userIdInput = inputData.getInt(Constants.DATA_USER_ID, 0) | |
// ktx | |
val outputData = workDataOf(Constants.DATA_SENT to isDataSent) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment