sending scan (waits for WiFi connection to sync) • Language learning apps (e.g. Duolingo or Memrise) - for daily notifications about new words to learn (recurring worker) • Instagram - chained worker for more complex tasks: take photo, apply filter, upload to server, share on Facebook and/or Twitter
fun doWork(): Result { // Do sth! return Result.success() } } val request: OneTimeWorkRequest = OneTimeWorkRequest.Builder(SampleWorker::class.java) .build() WorkManager.getInstance(applicationContext).enqueue(request)
and RxJava • Getting statuses of a worker • Cancelling and stopping workers • Existing workers - replace, keep, append • News in WorkManager - e.g. LongWorker