Because Firebase does not allow symbols as .
in the key, I suggest you encode the email address like this:
name@email.com -> name@email,com
As you probably see, instead of .
I have used ,
. To achieve this, you can use the following methods:
static String encodeUserEmail(String userEmail) {
return userEmail.replace(".", ",");
}
static String decodeUserEmail(String userEmail) {
return userEmail.replace(",", ".");
}