Good evening community
I need you to help me with the following, apparently the firebase releases an error with the commas and other points
THIS IS MY CODE:
public void onDataChange(DataSnapshot dataSnapshot) {
if(dataSnapshot.child(user.getUsuario()).exists()){
Toast.makeText(MainActivity.this, "El Usuario ya existe!", Toast.LENGTH_SHORT).show();
}
else
{
if(dataSnapshot.child(user.getEmail()).exists()){
Toast.makeText(MainActivity.this, "El Correo ya existe!", Toast.LENGTH_SHORT).show();
}
else {
usuarios.child(user.getUsuario()).setValue(user);
Toast.makeText(MainActivity.this,"Registrado!", Toast.LENGTH_SHORT).show();
}
}
THIS IS THE LOG:
com.google.firebase.database.DatabaseException: Invalid Firebase Database path: [email protected]. Firebase Database paths must not contain '.', '#', '$', '[', Or ']' at com.google.android.gms.internal.zzbtf.zzjl (Unknown Source) at com.google.firebase.database.DatabaseReference.child (Unknown Source) at com.google.firebase.database.DataSnapshot.child (Unknown Source) at com.example.gianp.demo.MainActivity $ 2 $ 1.onDataChange (MainActivity.java:72) at com.google.firebase.database.Query $ 1.onDataChange (Unknown Source) at com.google.android.gms.internal.zzbpx.zza (Unknown Source) at com.google.android.gms.internal.zzbqx.zzZS (Unknown Source) at com.google.android.gms.internal.zzbra $ 1.run (Unknown Source) at android.os.Handler.handleCallback (Handler.java:751)