February 2018
Intermediate to advanced
350 pages
7h 35m
English
The Observable.from methods are comparatively simpler than the Observable.create method. You can create the Observable instances from nearly every Kotlin structure with the help of from methods.
Let's take a look at the following code:
fun main(args: Array<String>) { val observer: Observer<String> = object : Observer<String> { override fun onComplete() { println("Completed") } override fun onNext(item: String) { println("Received-> $item") } override fun onError(e: Throwable) { println("Error Occured => ${e.message}") ...Read now
Unlock full access