Skip to content

Instantly share code, notes, and snippets.

@brainail
Created May 10, 2018 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brainail/9c64f3e90e4c87323d0c67dc5c69de54 to your computer and use it in GitHub Desktop.
Save brainail/9c64f3e90e4c87323d0c67dc5c69de54 to your computer and use it in GitHub Desktop.
class WorkSpec {
// ...
@ColumnInfo(name = "worker_class_name")
var workerClassName: String
// ...
}
fun doWork(): WorkerResult {
val className = // ...
mDelegate = WorkerWrapper.workerFromClassName(
getApplicationContext(),
className,
getId(),
getInputData(),
getRuntimeExtras())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment