Rx wrapper for the Firebase Android library.
This is the first one that works with RxJava 2!
repositories {
jcenter()
}
dependencies {
compile 'de.goddchen.android:rxfiredroid:0.2.1'
}
RxFireDroidDatabase.getValues("users")
.subscribe(dataSnapshot -> { /* do something... */});
RxFireDroidDatabase.observeValues("users")
.subscribe(dataSnapshot -> { /* do something... */});
RxFireDroidDatabase.deleteValues("user/123")
.subscribe();
RxFireDroidDatabase.setValue("user/123/name", "Goddchen")
.subscribe();
RxFireDroidAuth.signIn("[email protected]", "password123")
.subscribe(
firebaseUser -> { /* do something... */},
throwable -> { /* handle error */});
RxFireDroidRemoteConfig.getBoolean("awesome-feature")
.subscribe(
enabled -> { /* enable awesome feature */ },
throwable -> { /* Log error */ });
RxFireDroidStorage.getFile(ref, outFile)
.doOnError(throwable -> { /* Log error */ })
.subscribe();
RxFireDroidStorage.getDownloadUrl(ref)
.subscribe(
uri -> { /* Handle download url */ },
throwable -> { /* Log error */});
RxFireDroidStorage.putBytes(ref, bytes)
.doOnError(throwable -> { /* Log error */ })
.subscribe();
MIT