Skip to content

Instantly share code, notes, and snippets.

@kevalpatel2106
Created May 11, 2018 15:38
Show Gist options
  • Save kevalpatel2106/fb2181d0e6f3f78e22f46c436efd4ca0 to your computer and use it in GitHub Desktop.
Save kevalpatel2106/fb2181d0e6f3f78e22f46c436efd4ca0 to your computer and use it in GitHub Desktop.
class DownloadWorker : Worker() {
/**
* This function will be called whenever the work manager run the work.
*/
override fun doWork(): WorkerResult {
//Do some work
Thread.sleep(5000)
// Indicate success or failure with your return value.
return WorkerResult.SUCCESS
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment