The apps cannot insert any data to the database while this line of code makes error to the apps.
ref.child(uid).orderByChild(\"username\").equalTo(validateName)
As your error said, Firebase Database paths must not contain '.', '#', '$', '[', or ']'
. This means that Firebase does not allow you use in the key symbols those symbols. Because of that, you need to econde the email address like this:
name@email.com -> name@email,com
To achieve this, i recomand you using the following methods:
static String encodeUserEmail(String userEmail) {
return userEmail.replace(".", ",");
}
static String decodeUserEmail(String userEmail) {
return userEmail.replace(",", ".");
}