Last active
May 7, 2019 16:08
-
-
Save adriantache/5dae6ffd379b9352248a63f191cda24d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
WorkManager.getInstance(context).enqueue(notificationWork); | |
//alternatively, we can use this form to determine what happens to the existing stack | |
// WorkManager.getInstance(context).beginUniqueWork(workTag, ExistingWorkPolicy.REPLACE, notificationWork); | |
//ExistingWorkPolicy.REPLACE - Cancel the existing sequence and replace it with the new one | |
//ExistingWorkPolicy.KEEP - Keep the existing sequence and ignore your new request | |
//ExistingWorkPolicy.APPEND - Append your new sequence to the existing one, | |
//running the new sequence's first task after the existing sequence's last task finishes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment