0

I'm trying to check if a child exists in a location like this:

public static boolean checkIfNotebookExists(String notebookName) {
    if (notebooksRef.child(notebookName) == null)
        return false;
    else
        return true;
}

Whenever I call this function, I always get true even though the parameter that I include doesn't exist yet on the database.

Frank van Puffelen
  • 499,950
  • 69
  • 739
  • 734
Jeffrey Lopez
  • 985
  • 3
  • 15
  • 32

0 Answers0