Skip to content

Instantly share code, notes, and snippets.

@wisnukurniawan
Last active November 4, 2017 11:33
Show Gist options
  • Save wisnukurniawan/452d987f4fa06f723a4f3560d3a0fb6e to your computer and use it in GitHub Desktop.
Save wisnukurniawan/452d987f4fa06f723a4f3560d3a0fb6e to your computer and use it in GitHub Desktop.
import io.reactivex.Observable
import io.reactivex.Observer
import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers
fun main(args: Array<String>) {
val data: MutableList<String> = mutableListOf("Andi", "Beni", "Deni", "Fani", "Gita")
Observable
.just(data)
.observeOn(Schedulers.io())
.subscribe(
{
// Do on next
},
{
// Do on error
},
{
// Do on complete
}
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment