Last active
January 13, 2021 03:40
-
-
Save thrashedbrain/c020a579ab3dd2e31202c6b7ab19f935 to your computer and use it in GitHub Desktop.
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
allprojects { | |
repositories { | |
maven { url "https://oss.jfrog.org/libs-snapshot" } | |
} | |
} | |
dependencies { | |
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0' | |
implementation 'io.reactivex.rxjava3:rxjava:3.0.0' | |
} | |
defaultConfig { | |
applicationId "com.app.app" | |
minSdkVersion 19 | |
targetSdkVersion 30 | |
versionCode 1 | |
versionName "1.0" | |
compileOptions { | |
sourceCompatibility JavaVersion.VERSION_1_8 | |
targetCompatibility JavaVersion.VERSION_1_8 | |
} | |
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |
} |
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
Observable.just(obj) | |
.delay(500, TimeUnit.MILLISECONDS) | |
.subscribe(obj -> { | |
//do something | |
}); |
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
Observable.empty() | |
.delay(3, TimeUnit.SECONDS) | |
.subscribe(new Observer<Object>() { | |
@Override | |
public void onSubscribe(@NonNull Disposable d) { | |
} | |
@Override | |
public void onNext(@NonNull Object o) { | |
} | |
@Override | |
public void onError(@NonNull Throwable e) { | |
} | |
@Override | |
public void onComplete() { | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment