Skip to content

Instantly share code, notes, and snippets.

@athulantonynp
Last active May 10, 2018 12:22
Show Gist options
  • Select an option

  • Save athulantonynp/388335130ea51b24083dac7303399c74 to your computer and use it in GitHub Desktop.

Select an option

Save athulantonynp/388335130ea51b24083dac7303399c74 to your computer and use it in GitHub Desktop.
WorkManager-Sample
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