Last active
May 10, 2018 12:22
-
-
Save athulantonynp/388335130ea51b24083dac7303399c74 to your computer and use it in GitHub Desktop.
WorkManager-Sample
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
| public class MyWorker extends Worker { | |
| @Override | |
| public Worker.WorkerResult int doWork() { | |
| if(myBackgroundWork()){ | |
| return WorkerResult.SUCCESS; | |
| }else{ | |
| return WorkerResult.RETRY; | |
| } | |
| } | |
| //This is your background work. | |
| public boolean myBackgroundWork(){ | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment