Skip to content

Instantly share code, notes, and snippets.

@akueisara
Forked from ceruleanotter/SimpleChain.kt
Last active June 25, 2022 14:17
Show Gist options
  • Save akueisara/9ecaf5134a46c3320b39e4233af397a1 to your computer and use it in GitHub Desktop.
Save akueisara/9ecaf5134a46c3320b39e4233af397a1 to your computer and use it in GitHub Desktop.
WorkManager Basics: Simple Chain Example
WorkManager.getInstance()
// These three work requests run in parallel
.beginWith(Arrays.asList(
filterImageOneWorkRequest,
filterImageTwoWorkRequest,
filterImageThreeWorkRequest))
// The output from the filter WorkRequests
// will be passed as the input of compress WorkRequest
.then(compressWorkRequest)
.then(uploadWorkRequest)
.enqueue()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment