Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Observable.create(ObservableOnSubscribe<String> {
- it.onNext("Hello, Aya!")
- it.onComplete()
- }).subscribe(object : Observer<String>{
- override fun onComplete() {
- Log.i(TAG, "Complete")
- }
- override fun onSubscribe(d: Disposable) {
- Log.i(TAG, "onSubscribe")
- }
- override fun onNext(t: String) {
- Log.i(TAG, "Next: $t")
- }
- override fun onError(e: Throwable) {
- Log.i(TAG, "Error")
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement