This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
platform :ios, :deployment_target => "9.0" | |
use_frameworks! | |
def shared_dependencies | |
pod "acceptSDKTwo" | |
end | |
target 'AcceptDemo' do | |
shared_dependencies | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOT IMPLEMENTED YET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOT IMPLEMENTED YET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOT IMELEMENTED YET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOT IMPLEMENTED YET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOT IMPLEMENTED YET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
accept.anyObservableMethod() | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribe(...); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//completable | |
accept.methodReturnsCompletable().subscribe() //returns disposable, ignores all responses | |
accept.methodReturnsCompletable().subscribe(CompletableObserver s) //returns disposable, all responses came in given CompletableObserver | |
accept.methodReturnsCompletable().subscribe(Action onComplete, Consumer<? super Throwable> onError) //returns disposable, successful responses came in onComplete Action and error in onError | |
accept.methodReturnsCompletable().subscribe(Action onComplete) //returns disposable, successful response came in given Action, error is ignored | |
//single | |
accept.methodReturnsSingle().subscribe() //returns disposable, ignores all responses | |
accept.methodReturnsSingle().subscribe(BiConsumer<? super T, ? super Throwable> onCallback) //returns disposable, all responses came in given |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//completable | |
accept.methodReturnsCompletable().blockingAwait() //returns void or rethrows any exception emitted | |
accept.methodReturnsCompletable().blockingGet() //returns null or the emitted exception if any | |
//single | |
accept.methodReturnsSingle().blockingGet() //returns success object or rethrows any exception emitted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.jakewharton.rxrelay2.BehaviorRelay; | |
import com.jakewharton.rxrelay2.Relay; | |
import io.reactivex.android.schedulers.AndroidSchedulers; | |
Relay<Event> eventObservable = BehaviorRelay.create(); | |
accept.methodReturnsSingleParallel() | |
.subscribeParallel(eventObservable) | |
.observeOn(AndroidSchedulers.mainThread()) |
OlderNewer