RxFBase

Additional

Language
Java
Version
1.0.0 (Aug 14, 2017)
Created
Aug 14, 2017
Updated
May 7, 2018 (Retired)
Owner
Muh Isfhani Ghiath (isfaaghyth)
Contributor
Muh Isfhani Ghiath (isfaaghyth)
1
Activity
Badge
Generate
Download
Source code

RxFBase

wrapping firebase with rx

In the past, I have a problem when doing real-time marker mapping (maps) using firebase. So, I tried to create this library for my case. enjoy!

TODO:

  • firebase database
  • firebase auth
  • firebase storage

Installation

Add it in your root build.gradle at the end of repositories:

allprojects {
   repositories {
      ...
      maven { url 'https://jitpack.io' }
   }
}

Add the dependency

implementation 'com.github.isfaaghyth:RxFBase:1.0.0'

Usage

set value:

HashMap<String, String> data = new HashMap<>();
data.put("title", "this is title");
data.put("message", "awesome message!");
RxFirebase.setValue(dbRef, data)
          .subscribe(isSuccess -> {
            //isSuccess true/false
          });

for singleValue:

RxFirebase.singleValue(dbRef)
          .subscribe(dataSnapshot -> {
            //do something!
          }, throwable -> {
            //ops!
          });

for childValue:

RxFirebase.childValue(dbRef)
          .subscribe(dataSnapshot -> {
            //do something!
          }, throwable -> {
            //ops!
          });

enjoy!

MIT