there is

FirebaseDatabase.getInstance().setPersistenceEnabled(true); databaseSpele = FirebaseDatabase.getInstance().getReference("Spele2").child(...); 

In the place of the child (branch), you need to enter the email that you specify when entering data. But it does not accept EditText, ID-fields, or variables. How to do it?

 String id = databaseSpele.push().getKey(); 

As far as is known, something needs to be written in this code?

    1 answer 1

    You can not use email as an id.
    The dot (.) Is an invalid character. See rules

    Here is a similar question:
    https://stackoverflow.com/questions/41713039/can-we-have-email-id-as-key-in-firebase-database
    and
    https://stackoverflow.com/questions/41372563/swift-firebase-must-be-a-non-empty-string-and-not-contain-or

    No need to use email as an id, each user has a unique uid - that’s what you ’ll use it for

     FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser(); String uid = user.getUid(); ... FirebaseDatabase.getInstance().getReference("Spele2").child(uid);