Share code snippets.

FireBaseUtils

Created 2 years ago by anonymous
How to get the FirebaseDatabase
public class FireBaseUtils {
private static FirebaseDatabase mDatabase;

public static FirebaseDatabase getDatabase() {
   if (mDatabase == null) {
      mDatabase = FirebaseDatabase.getInstance();
      mDatabase.setPersistenceEnabled(true);
   }
return mDatabase;
}

}