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
  • 565,676
  • 79
  • 828
  • 807
zepolyerf
  • 1,098
  • 3
  • 16
  • 35

0 Answers0