Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 699 Bytes

README.md

File metadata and controls

20 lines (16 loc) · 699 Bytes

RxTasks

Small library to convert from Google's Task to RxJava2.

Release

Usage

  1. Setup with JitPack
  2. Use in code:
val task = Tasks.forResult(42)
task.asSingle().subscribe{ theAnswer -> searchQuestion(theAnswer) }

Java

RxTasks is build on kotlin extension functions, in order to use it in Java you need to use RxTasksKt as follows:

Task<Integer> task = Tasks.forResult(42);
RxTasksKt.asSingle(task).subscribe(theAnswer -> searchQuestion(theAnswer));